Parcourir la source

Import only __version__ when using tag

Jérôme BUISINE il y a 3 ans
Parent
commit
73541b203d
3 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 0 0
      .github/workflows/python-resources.yml
  2. 3 3
      docs/source/conf.py
  3. 2 2
      setup.py

.github/workflows/docs.yml → .github/workflows/python-resources.yml


+ 3 - 3
docs/source/conf.py

@@ -17,7 +17,7 @@ import sys
 import asteroid_sphinx_theme
 
 sys.path.insert(0, os.path.abspath('../../../macop'))
-import macop
+from macop import __version__
 
 # -- Project information -----------------------------------------------------
 
@@ -26,9 +26,9 @@ copyright = '2021, Jérôme BUISINE'
 author = 'Jérôme BUISINE'
 
 # The short X.Y version
-version = macop.__version__
+version = __version__
 # The full version, including alpha/beta/rc tags
-release = macop.__version__
+release = __version__
 
 
 # -- General configuration ---------------------------------------------------

+ 2 - 2
setup.py

@@ -1,6 +1,6 @@
 from setuptools import setup
 import distutils.command.check
-import macop
+from macop import __version__
 
 class TestCommand(distutils.command.check.check):
     """Custom test command."""
@@ -83,7 +83,7 @@ class TestCommand(distutils.command.check.check):
 
 setup(
     name='macop',
-    version=macop.__version__,
+    version=__version__,
     description='Minimalist And Customisable Optimisation Package',
     long_description=open('README.md').read(),
     long_description_content_type='text/markdown',