Fixing setup to install without cython

This commit is contained in:
Yomguithereal 2018-08-23 15:41:34 +02:00
parent 84a0b6a602
commit 22f85c9415
3 changed files with 16 additions and 12 deletions

2
MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
include README.md
recursive-include fog *.c *.pyx

View File

@ -7,10 +7,12 @@ test: build-ext unit
publish: lint test upload clean
build-ext:
python setup.py build_ext --inplace
find . -name *.pyx | xargs cython
clean:
rm -rf *.egg-info .pytest_cache .ipynb_checkpoints ./**/__pycache__ ./**/**/__pycache__ build dist
rm -rf *.egg-info .pytest_cache .ipynb_checkpoints build dist
find . -name __pycache__ -type d | xargs rm -rf
find . -name *.c -type f | xargs rm
lint:
@echo Linting source code using pep8...

View File

@ -1,11 +1,17 @@
from setuptools import setup, find_packages
from Cython.Build import cythonize
from setuptools import setup, find_packages, Extension
with open('./README.md', 'r') as f:
long_description = f.read()
EXTENSIONS = [
Extension(
'fog.metrics.levenshtein',
['fog/metrics/levenshtein.c']
)
]
setup(name='fog',
version='0.5.3',
version='0.5.4',
description='A fuzzy matching & clustering library for python.',
long_description=long_description,
long_description_content_type='text/markdown',
@ -16,18 +22,12 @@ setup(name='fog',
keywords='fuzzy',
python_requires='>=3',
packages=find_packages(exclude=['experiments', 'test']),
ext_modules=cythonize('fog/metrics/*.pyx'),
package_data={'': ['*.pyx'], 'docs': ['README.md']},
ext_modules=EXTENSIONS,
install_requires=[
'cython',
'dill==0.2.7.1',
'phylactery==0.1.1',
'Unidecode==1.0.22'
],
setup_requires=[
'cython',
'setuptools>=18.0'
],
entry_points={
'console_scripts': ['fog=fog.cli.__main__:main']
},