Skip to content

Commit

Permalink
Merge pull request numpy#18205 from charris/update-pavement
Browse files Browse the repository at this point in the history
MAINT: Update pavement.py to work with versioneer.
  • Loading branch information
rgommers authored Jan 24, 2021
2 parents 2fc0786 + ec90d3c commit 38ca158
Showing 1 changed file with 20 additions and 28 deletions.
48 changes: 20 additions & 28 deletions pavement.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import sys
import shutil
import hashlib
import textwrap

# The paver package needs to be installed to run tasks
import paver
Expand All @@ -49,25 +50,13 @@
installersdir=os.path.join("release", "installers")),)


#-----------------------------
# Generate the release version
#-----------------------------
#------------------------
# Get the release version
#------------------------

sys.path.insert(0, os.path.dirname(__file__))
try:
setup_py = __import__("setup")
FULLVERSION = setup_py.VERSION
# This is duplicated from setup.py
if os.path.exists('.git'):
GIT_REVISION = setup_py.git_version()
elif os.path.exists('numpy/version.py'):
# must be a source distribution, use existing version file
from numpy.version import git_revision as GIT_REVISION
else:
GIT_REVISION = "Unknown"

if not setup_py.ISRELEASED:
FULLVERSION += '.dev0+' + GIT_REVISION[:7]
from setup import FULLVERSION
finally:
sys.path.pop(0)

Expand Down Expand Up @@ -210,22 +199,25 @@ def write_release_task(options, filename='README'):
with open(notes) as fnotes:
freadme.write(fnotes.read())

freadme.writelines("""
Checksums
=========
freadme.writelines(textwrap.dedent(
"""
Checksums
=========
MD5
---
::
MD5
---
::
""")
"""))
freadme.writelines([f' {c}\n' for c in compute_md5(idirs)])
freadme.writelines("""
SHA256
------
::

""")
freadme.writelines(textwrap.dedent(
"""
SHA256
------
::
"""))
freadme.writelines([f' {c}\n' for c in compute_sha256(idirs)])

# generate md file using pandoc before signing
Expand Down

0 comments on commit 38ca158

Please sign in to comment.