@@ -612,20 +612,17 @@ def prefix(directory, files):
612612
613613# setup
614614
615- # ########## #
616- # version.py #
617- # ########## #
618-
619- def get_version ():
620- """Returns current version number from version.py file"""
615+ def get_version (debian = False ):
616+ """Returns current version number from _version.py file"""
621617 dirname = os .path .join (
622- os .path .dirname (os .path .abspath (__file__ )),
623- 'src' ,
624- 'hdf5plugin' )
618+ os .path .dirname (os .path .abspath (__file__ )), "src" , PROJECT )
625619 sys .path .insert (0 , dirname )
620+ dont_write_bytecode = sys .dont_write_bytecode
621+ sys .dont_write_bytecode = True # Avoid creating __pycache__/_version.pyc
626622 import _version
627623 sys .path = sys .path [1 :]
628- return _version .strictversion
624+ sys .dont_write_bytecode = dont_write_bytecode
625+ return _version .debianversion if debian else _version .strictversion
629626
630627
631628################################################################################
@@ -646,8 +643,7 @@ class sdist_debian(sdist):
646643
647644 @staticmethod
648645 def get_debian_name ():
649- import version
650- name = "%s_%s" % (PROJECT , version .debianversion )
646+ name = "%s_%s" % (PROJECT , get_version (debian = True ))
651647 return name
652648
653649 def prune_file_list (self ):
@@ -693,6 +689,7 @@ def make_distribution(self):
693689
694690PROJECT = 'hdf5plugin'
695691author = "ESRF - Data Analysis Unit"
692+ author_email = "silx@esrf.fr"
696693description = "HDF5 Plugins for windows,MacOS and linux"
697694url = 'https://github.com/silx-kit/hdf5plugin'
698695f = open ("README.rst" )
@@ -730,6 +727,7 @@ def make_distribution(self):
730727 setup (name = PROJECT ,
731728 version = get_version (),
732729 author = author ,
730+ author_email = author_email ,
733731 url = url ,
734732 classifiers = classifiers ,
735733 description = description ,
0 commit comments