Skip to content

Commit

Permalink
Fix issue with package version definition
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyPechnikov committed Jan 25, 2024
1 parent 208ebfc commit b23580b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions pygmtsar/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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',
Expand Down

0 comments on commit b23580b

Please sign in to comment.