Skip to content

Commit

Permalink
Fix setup.py, bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgobbo committed Sep 18, 2024
1 parent c84a8e9 commit 1247e5c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datahub/package_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
15 changes: 11 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

PACKAGE_PREFIX = "psi-"
PACKAGE_NAME = "datahub"
VERSION_FILE = "package_version.txt"

def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

def version():
p = pathlib.Path(__file__).parent.joinpath(PACKAGE_NAME).joinpath("package_version.txt")
p = pathlib.Path(__file__).parent.joinpath(PACKAGE_NAME).joinpath(VERSION_FILE)
with open(p, "r") as f1:
return f1.read()[:-1]

Expand All @@ -27,13 +28,19 @@ def version():
long_description=read('Readme.md'),
long_description_content_type="text/markdown",
install_requires=[
"numpy",
"requests",
"h5py",
],
entry_points={
'console_scripts': [
f'{PACKAGE_NAME} = {PACKAGE_NAME}.main:main',
],
},
data_files=[
(f"{PACKAGE_NAME}", [f"{PACKAGE_NAME}/package_version.txt"])
]
# Include the non-code file (package_version.txt) in the package folder
include_package_data=True,
package_data={
# Include the text file in the package directory
PACKAGE_NAME: [VERSION_FILE],
},
)

0 comments on commit 1247e5c

Please sign in to comment.