diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a5e649ac..e307db01 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -48,7 +48,7 @@ jobs: gmtsar_sharedir.csh - name: Install PyGMTSAR run: | - pip3 install pyvista panel distributed + pip3 install pyvista panel pip3 install -e ./pygmtsar/ - name: Run test working-directory: tests diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ad96c2e1..c6ad6520 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -62,7 +62,7 @@ jobs: - name: Install PyGMTSAR run: | # vtk rendering - pip3 install pyvista panel distributed + pip3 install pyvista panel pip3 install -e ./pygmtsar/ - name: Run test working-directory: tests diff --git a/pygmtsar/setup.py b/pygmtsar/setup.py index a66b5e28..2aa9258c 100644 --- a/pygmtsar/setup.py +++ b/pygmtsar/setup.py @@ -11,9 +11,16 @@ from setuptools import setup import urllib.request -from pygmtsar import __version__ -# read the contents of your README file +def get_version(): + with open("pygmtsar/__init__.py", "r") as f: + for line in f: + if line.startswith("__version__"): + version = line.split('=')[1] + version = version.replace("'", "").replace('"', "").strip() + return version + +# read the contents of local README file #from pathlib import Path #this_directory = Path(__file__).parent #long_description = (this_directory / "README.md").read_text() @@ -24,7 +31,7 @@ setup( name='pygmtsar', - version=__version__, + version=get_version(), description='PyGMTSAR (Python GMTSAR) - Easy and Fast Satellite Interferometry For Everyone', long_description=long_description, long_description_content_type='text/markdown',