Skip to content

Commit

Permalink
FIX issue with get_version() function in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sfneal committed Jul 2, 2024
1 parent 375e4fc commit 7b58042
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

def get_version(version_file='_version.py'):
"""Retrieve the package version from a version file in the package root."""
filename = os.path.join(os.path.dirname(__file__), 'pdfconduit', version_file)
with open(filename, 'rb') as fp:
return fp.read().decode('utf8').split('=')[1].strip(" \n'")
with open(os.path.join(os.path.dirname(__file__), 'pdfconduit', version_file), 'rb') as fp:
return fp.read().decode('utf8').split('=')[1].strip("\n").replace('"', '')


setup(
Expand Down

0 comments on commit 7b58042

Please sign in to comment.