Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.py #18

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update setup.py
Update setup to obtain version from github version
  • Loading branch information
gbernardino authored Nov 28, 2024
commit bcba4700ad8e58a1c7991efe6f68871c2d38372e
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
#!/usr/bin/env python

from distutils.core import setup
import subprocess

def _get_version_hash():
"""Talk to git and find out the tag/hash of our latest commit"""
try:
p = subprocess.Popen(["git", "describe",
"--tags", "--dirty", "--always"],
stdout=subprocess.PIPE)
except EnvironmentError:
print("Couldn't run git to get a version number for setup.py")
return
ver = p.communicate()[0]
return ver.strip()

setup(name='pymust',
version='0.1.2',
description='Python port of the MUST toolbox for ultrasound signal processing and generation of simulated images.',
author='Gabriel Bernardino (Python port), Damien Garcia (original matlab code)',
author_email='[email protected]',
url='https://www.biomecardio.com/en//',
version=_get_version_hash(),
packages=['pymust'],
license = 'GNU Lesser General Public License v3.0 (LGPL v3)',
package_dir={'':'src'}
Expand Down