|
1 | 1 | from setuptools import setup, find_packages |
2 | 2 | from codecs import open |
3 | 3 | from os import path |
4 | | -from category_encoders import __version__ |
5 | | - |
| 4 | +import re |
6 | 5 |
|
7 | 6 | here = path.abspath(path.dirname(__file__)) |
8 | 7 |
|
9 | 8 | # Get the long description from the README file |
10 | 9 | with open(path.join(here, 'README.md'), encoding='utf-8') as f: |
11 | 10 | long_description = f.read() |
12 | 11 |
|
| 12 | +# Get the version from the __init__.py file |
| 13 | +with open(path.join(here, 'category_encoders/__init__.py'), encoding='utf-8') as f: |
| 14 | + __version__ = re.findall('''__version__ = ['"](.*)['"]''', f.read())[0] |
| 15 | + |
13 | 16 | setup( |
14 | 17 | name='category_encoders', |
15 | 18 | version=__version__, |
16 | | - description='A collection sklearn transformers to encode categorical variables as numeric', |
| 19 | + description='A collection of sklearn transformers to encode categorical variables as numeric', |
17 | 20 | long_description=long_description, |
18 | 21 | long_description_content_type='text/markdown', |
19 | 22 | url='https://github.com/scikit-learn-contrib/category_encoders', |
|
25 | 28 | 'Programming Language :: Python :: 3', |
26 | 29 | ], |
27 | 30 | keywords='python data science machine learning pandas sklearn', |
28 | | - packages=find_packages(include=['category_encoders']), |
| 31 | + packages=find_packages(include=['category_encoders', 'category_encoders.datasets']), |
29 | 32 | include_package_data=True, |
30 | 33 | author='Will McGinnis', |
31 | 34 | install_requires=[ |
|
0 commit comments