Skip to content

Commit

Permalink
Fix python version file
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniBussi committed Mar 8, 2022
1 parent b89a620 commit 78e4752
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include VERSION
include PLUMED_VERSION
include include/Plumed.h
include plumed.pyx
include cplumed.pxd
5 changes: 3 additions & 2 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ all:
endif

pip:
cp ../VERSION .
cp ../VERSION ./PLUMED_VERSION
mkdir -p include
cp ../src/wrapper/Plumed.h include/

Expand All @@ -44,6 +44,7 @@ pypi:
mkdir -p pypi/include
cp -r test pypi/
cp ../src/wrapper/Plumed.h pypi/include/
cp README.rst MANIFEST.in cplumed.pxd plumed.pyx setup.py ../VERSION pypi/
cp README.rst MANIFEST.in cplumed.pxd plumed.pyx setup.py pypi/
cp ../VERSION pypi/PLUMED_VERSION
cd pypi ; $(python_bin) setup.py sdist
echo "now use: $(python_bin) -m twine upload dist/plumed-$(VERSION).tar.gz"
4 changes: 2 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def is_platform_mac():
return sys.platform == 'darwin'

if os.getenv("plumed_macports") is not None:
copyfile("../VERSION","VERSION")
copyfile("../VERSION","PLUMED_VERSION")
try:
os.mkdir("include")
except OSError:
Expand All @@ -53,7 +53,7 @@ def is_platform_mac():

plumedversion = os.getenv("plumed_version")
if plumedversion is None:
plumedversion = subprocess.check_output(['grep','-v','#','./VERSION']).decode("utf-8").rstrip()
plumedversion = subprocess.check_output(['grep','-v','#','./PLUMED_VERSION']).decode("utf-8").rstrip()

print( "Module name " + plumedname )
print( "Version number " + plumedversion )
Expand Down

0 comments on commit 78e4752

Please sign in to comment.