|
| 1 | +import os |
| 2 | + |
| 3 | +from setuptools import find_packages, setup |
| 4 | + |
| 5 | +with open('README.rst') as readme_file: |
| 6 | + readme = readme_file.read() |
| 7 | + |
| 8 | + |
| 9 | +def prerelease_local_scheme(version): |
| 10 | + """ |
| 11 | + Return local scheme version unless building on master in CircleCI. |
| 12 | +
|
| 13 | + This function returns the local scheme version number |
| 14 | + (e.g. 0.0.0.dev<N>+g<HASH>) unless building on CircleCI for a |
| 15 | + pre-release in which case it ignores the hash and produces a |
| 16 | + PEP440 compliant pre-release version number (e.g. 0.0.0.dev<N>). |
| 17 | + """ |
| 18 | + from setuptools_scm.version import get_local_node_and_date |
| 19 | + |
| 20 | + if os.getenv('CIRCLE_BRANCH') in ('master', ): |
| 21 | + return '' |
| 22 | + else: |
| 23 | + return get_local_node_and_date(version) |
| 24 | + |
| 25 | + |
| 26 | +setup( |
| 27 | + name='histomicsui', |
| 28 | + use_scm_version={'local_scheme': prerelease_local_scheme, 'fallback_version': '0.0.0'}, |
| 29 | + setup_requires=['setuptools-scm'], |
| 30 | + description='Organize, visualize, and analyze histology images.', |
| 31 | + author='Kitware, Inc.', |
| 32 | + author_email='kitware@kitware.com', |
| 33 | + classifiers=[ |
| 34 | + 'Development Status :: 5 - Production/Stable', |
| 35 | + 'License :: OSI Approved :: Apache Software License', |
| 36 | + 'Natural Language :: English', |
| 37 | + 'Programming Language :: Python :: 3', |
| 38 | + 'Programming Language :: Python :: 3.8', |
| 39 | + 'Programming Language :: Python :: 3.9', |
| 40 | + 'Programming Language :: Python :: 3.10', |
| 41 | + 'Programming Language :: Python :: 3.11', |
| 42 | + 'Programming Language :: Python :: 3.12', |
| 43 | + ], |
| 44 | + install_requires=[ |
| 45 | + 'girder-large-image-annotation>=1.25.0', |
| 46 | + 'girder-slicer-cli-web>=1.4.0', |
| 47 | + 'cachetools', |
| 48 | + 'orjson', |
| 49 | + ], |
| 50 | + extras_require={ |
| 51 | + 'analysis': [ |
| 52 | + 'girder-slicer-cli-web[girder]>=1.2.3', |
| 53 | + ], |
| 54 | + }, |
| 55 | + license='Apache Software License 2.0', |
| 56 | + long_description=readme, |
| 57 | + long_description_content_type='text/x-rst', |
| 58 | + include_package_data=True, |
| 59 | + keywords='girder-plugin, histomicsui', |
| 60 | + packages=find_packages(exclude=['test', 'test.*']), |
| 61 | + url='https://github.com/DigitalSlideArchive/histomicsui', |
| 62 | + zip_safe=False, |
| 63 | + python_requires='>=3.8', |
| 64 | + entry_points={ |
| 65 | + 'girder.plugin': [ |
| 66 | + 'histomicsui = histomicsui:GirderPlugin', |
| 67 | + ], |
| 68 | + }, |
| 69 | +) |
0 commit comments