Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuclia/cython local #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dist
*.c
*.pyc
*.swo
.python-version
24 changes: 6 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,19 @@ PYTHON ?= python
PIP ?= pip
CYTHON ?= cython

_default: compile
_default: install

clean:
rm -fr emcache/_cython/*.c emcache/_cython/*.so build dist
find . -name '__pycache__' | xargs rm -rf
find . -type f -name "*.pyc" -delete

.install-cython:
$(PIP) install Cython==0.29.18
touch .install-cython

emcache/_cython/cyemcache.c: emcache/_cython/cyemcache.pyx
$(CYTHON) -3 -o $@ $< -I emcache

cythonize: .install-cython emcache/_cython/cyemcache.c

setup-build:
$(PYTHON) setup.py build_ext --inplace

compile: clean cythonize setup-build

install-dev: compile
install-dev: clean
$(PIP) install Cython==0.29.21
$(PIP) install -e ".[dev]"

install: compile
install:
$(PIP) install Cython==0.29.21
$(PIP) install -e .

format:
Expand Down Expand Up @@ -62,4 +50,4 @@ doc:
make -C docs/ html


.PHONY: clean setup-build install install-dev compile unit test acceptance stress
.PHONY: clean install install-dev unit test acceptance stress
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
extensions = [
Extension(
"emcache._cython.cyemcache",
sources=["emcache/_cython/cyemcache.c"],
sources=["emcache/_cython/cyemcache.pyx"],
include_dirs=[MURMUR3_DIR],
library_dirs=[MURMUR3_DIR],
libraries=["murmur3"],
)
]

dev_requires = [
"Cython==0.29.18",
"Cython==0.29.21",
"pytest==5.4.1",
"pytest-mock==3.1.0",
"pytest-asyncio==0.11.0",
Expand Down Expand Up @@ -57,6 +57,7 @@ def get_version():
author_email="[email protected]",
platforms=["*nix"],
packages=["emcache"],
setup_requires=["setuptools>=18.0", "cython"],
ext_modules=extensions,
extras_require={"dev": dev_requires},
classifiers=[
Expand Down