|
| 1 | +import io |
| 2 | +import re |
| 3 | +from glob import glob |
| 4 | +from os.path import basename |
| 5 | +from os.path import dirname |
| 6 | +from os.path import join |
| 7 | +from os.path import splitext |
| 8 | + |
| 9 | +# Always prefer setuptools over distutils |
| 10 | +from setuptools import setup, find_namespace_packages |
| 11 | +# To use a consistent encoding |
| 12 | +from codecs import open |
| 13 | +from os import path |
| 14 | + |
| 15 | +exec(open('src/ecgcscodec/version.py').read()) |
| 16 | +here = path.abspath(path.dirname(__file__)) |
| 17 | + |
| 18 | +def read(*names, **kwargs): |
| 19 | + with io.open( |
| 20 | + join(dirname(__file__), *names), |
| 21 | + encoding=kwargs.get('encoding', 'utf8') |
| 22 | + ) as fh: |
| 23 | + return fh.read() |
| 24 | + |
| 25 | +# Get the long description from the README file |
| 26 | +with open(path.join(here, 'README.md'), encoding='utf-8') as f: |
| 27 | + long_description = f.read() |
| 28 | + |
| 29 | +def _parse_requirements(filename): |
| 30 | + with open(path.join(here, filename)) as f: |
| 31 | + return [ |
| 32 | + line.rstrip() |
| 33 | + for line in f |
| 34 | + if not (line.isspace() or line.startswith('#')) |
| 35 | + ] |
| 36 | + |
| 37 | +setup( |
| 38 | + name='ecg-cs-codec', |
| 39 | + |
| 40 | + version=__version__, |
| 41 | + |
| 42 | + description='Compressive Sensing based ECG Codec', |
| 43 | + long_description=long_description, |
| 44 | + long_description_content_type="text/markdown", |
| 45 | + |
| 46 | + # The project's main homepage. |
| 47 | + url='https://github.com/shailesh1729/ecg-cs-codec', |
| 48 | + download_url=f"https://github.com/shailesh1729/ecg-cs-codec/v{__version__}.tar.gz", |
| 49 | + |
| 50 | + # Author details |
| 51 | + author='Shailesh Kumar', |
| 52 | + |
| 53 | + |
| 54 | + # Choose your license |
| 55 | + license='Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0', |
| 56 | + |
| 57 | + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers |
| 58 | + classifiers=[ |
| 59 | + # How mature is this project? Common values are |
| 60 | + # 3 - Alpha |
| 61 | + # 4 - Beta |
| 62 | + # 5 - Production/Stable |
| 63 | + 'Development Status :: 3 - Alpha', |
| 64 | + |
| 65 | + # Indicate who your project is intended for |
| 66 | + 'Intended Audience :: Developers', |
| 67 | + 'Topic :: Multimedia', |
| 68 | + 'Topic :: Multimedia :: Video', |
| 69 | + 'Topic :: Scientific/Engineering :: Image Processing', |
| 70 | + 'Topic :: Scientific/Engineering :: Image Recognition', |
| 71 | + # License |
| 72 | + 'License :: OSI Approved :: Apache Software License', |
| 73 | + # OS Support |
| 74 | + 'Operating System :: Unix', |
| 75 | + 'Operating System :: POSIX', |
| 76 | + # 'Operating System :: Microsoft :: Windows', |
| 77 | + # Specify the Python versions you support here. In particular, ensure |
| 78 | + # that you indicate whether you support Python 2, Python 3 or both. |
| 79 | + 'Programming Language :: Python :: 3.8', |
| 80 | + 'Programming Language :: Python :: 3.9', |
| 81 | + 'Programming Language :: Python :: Implementation :: CPython', |
| 82 | + ], |
| 83 | + project_urls={ |
| 84 | + 'Issue Tracker': "https://github.com/shailesh1729/ecg-cs-codec/issues" |
| 85 | + }, |
| 86 | + # What does your project relate to? |
| 87 | + keywords='ECG, Compression, Compressive Sensing', |
| 88 | + # You can just specify the packages manually here if your project is |
| 89 | + # simple. Or you can use find_packages(). |
| 90 | + packages=['ecgcscodec'], |
| 91 | + package_dir={'': 'src'}, |
| 92 | + py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')], |
| 93 | + python_requires=">=3.8", |
| 94 | + # List run-time dependencies here. These will be installed by pip when |
| 95 | + # your project is installed. For an analysis of "install_requires" vs pip's |
| 96 | + # requirements files see: |
| 97 | + # https://packaging.python.org/en/latest/requirements.html |
| 98 | + install_requires=_parse_requirements('requirements.txt'), |
| 99 | + tests_require=_parse_requirements('requirements-tests.txt'), |
| 100 | + # List additional groups of dependencies here (e.g. development |
| 101 | + # dependencies). You can install these using the following syntax, |
| 102 | + # for example: |
| 103 | + # $ pip install -e .[dev,test] |
| 104 | + extras_require={ |
| 105 | + 'dev': [ ], |
| 106 | + 'test': _parse_requirements('requirements-tests.txt'), |
| 107 | + }, |
| 108 | + include_package_data=True, |
| 109 | + zip_safe=False, |
| 110 | + |
| 111 | + # If there are data files included in your packages that need to be |
| 112 | + # installed, specify them here. If using Python 2.6 or less, then these |
| 113 | + # have to be included in MANIFEST.in as well. |
| 114 | + package_data={ |
| 115 | + }, |
| 116 | + |
| 117 | + # Although 'package_data' is the preferred approach, in some case you may |
| 118 | + # need to place data files outside of your packages. See: |
| 119 | + # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa |
| 120 | + # In this case, 'data_file' will be installed into '<sys.prefix>/my_data' |
| 121 | + data_files=[], |
| 122 | + |
| 123 | + # To provide executable scripts, use entry points in preference to the |
| 124 | + # "scripts" keyword. Entry points provide cross-platform support and allow |
| 125 | + # pip to create the appropriate form of executable for the target platform. |
| 126 | + entry_points={ |
| 127 | + 'console_scripts': [ |
| 128 | + 'ecg-codec=ecgcscodec.apps.codec:main', |
| 129 | + ], |
| 130 | + }, |
| 131 | +) |
0 commit comments