Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
beniroquai committed Jun 27, 2024
1 parent 186b6c9 commit 70df902
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@
from setuptools.command.build_py import build_py
import versioneer

from setuptools import setup, find_packages

# Version will be read from your package's __init__.py
# Make sure __version__ is defined in imswitch/__init__.py
def get_version():
version_file = 'imswitch/__init__.py'
with open(version_file, 'r') as file:
for line in file:
if line.startswith('__version__'):
# Strip the line to remove whitespaces and newline characters,
# then split it on '=' and strip again to remove any remaining whitespaces.
# Finally, strip the quotes from the version string.
return line.strip().split('=')[1].strip().strip('\'"')
raise RuntimeError('Unable to find version string.')



requires = [
'numpy>=1.18.1',
'pyjnius>=1.2.1',
Expand All @@ -20,8 +37,8 @@
'blessed>=1.17' #'imagecodecs>=2021.6.8',
]


VERSION = versioneer.get_version()
# get version from init file
VERSION = get_version()
DESCRIPTION = ('Alignment by Simultaneous Harmonization of Layer/Adjacency '
'Registration')
LONG_DESCRIPTION='''
Expand Down

0 comments on commit 70df902

Please sign in to comment.