Skip to content

Commit

Permalink
Merge pull request #3 from jond01/fix-version-import
Browse files Browse the repository at this point in the history
Fix version import
  • Loading branch information
elazar-rsipvision committed Jun 24, 2021
2 parents 9108b69 + e7c4814 commit bb2538f
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
from setuptools import setup, find_packages

from medio import __version__

def get_version(rel_path):
with open(rel_path, 'r') as fp:
for line in fp:
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")


with open('README.md') as f:
long_description = f.read()


setup(name='medio',
version=__version__,
version=get_version("medio/__init__.py"),
description='Medical images I/O python package',
long_description=long_description,
long_description_content_type='text/markdown',
Expand All @@ -17,31 +25,31 @@
keywords=['medical-images', 'IO', 'itk', 'nibabel', 'pydicom', 'python'],
packages=find_packages(exclude=['*.tests']),
install_requires=[
'itk >= 5.1.2',
'nibabel >= 3.2.1',
'pydicom >= 2.1.2',
'dicom-numpy >= 0.5.0',
'numpy >= 1.18.1'
'itk >= 5.1.2',
'nibabel >= 3.2.1',
'pydicom >= 2.1.2',
'dicom-numpy >= 0.5.0',
'numpy >= 1.18.1',
],
python_requires='>=3.6',
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 3 - Alpha',

'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Healthcare Industry',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Healthcare Industry',
'Intended Audience :: Science/Research',

'Topic :: Scientific/Engineering :: Medical Science Apps.',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering :: Medical Science Apps.',
'Topic :: Software Development :: Libraries :: Python Modules',

'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',

'Operating System :: OS Independent'
'Operating System :: OS Independent',
],
license='Apache License 2.0',
zip_safe=True)

0 comments on commit bb2538f

Please sign in to comment.