Skip to content

Commit 725ac12

Browse files
package example data in wheel
1 parent b0d5a4a commit 725ac12

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

setup.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from setuptools import find_packages, setup
77

8-
VERSION = "1.2.2"
8+
VERSION = "1.2.3"
99

1010
# add the README.md file to the long_description
1111
with open("README.md", "r") as fh:
@@ -70,7 +70,7 @@ def get_cuda_version():
7070
"typing",
7171
dali,
7272
# PyPI does not support direct dependencies, so we remove this line before uploading from PyPI
73-
# "segment_anything @ git+https://github.com/facebookresearch/segment-anything.git",
73+
"segment_anything @ git+https://github.com/facebookresearch/segment-anything.git",
7474
]
7575

7676
# additional requirements
@@ -91,17 +91,9 @@ def get_cuda_version():
9191
},
9292
}
9393

94-
# collect all data and script files
95-
data_files = []
96-
for root, dirs, files in os.walk("data"):
97-
data_files.extend([os.path.join(root, f) for f in files])
98-
for root, dirs, files in os.walk("scripts"):
99-
data_files.extend([os.path.join(root, f) for f in files])
100-
101-
10294
setup(
10395
name="lightning-pose",
104-
packages=find_packages(exclude=("data", "docs", "scripts", "tests")),
96+
packages=find_packages() + ["mirror_mouse_example"], # include data for wheel packaging
10597
version=VERSION,
10698
description="Semi-supervised pose estimation using pytorch lightning",
10799
long_description=long_description,
@@ -112,6 +104,9 @@ def get_cuda_version():
112104
author_email="danbider@gmail.com",
113105
url="https://github.com/danbider/lightning-pose",
114106
keywords=["machine learning", "deep learning", "computer_vision"],
115-
package_data={"": data_files},
116-
include_package_data=True,
107+
package_dir={
108+
"lightning_pose": "lightning_pose",
109+
"mirror_mouse_example": "data/mirror-mouse-example", # remap 'data/mirror-mouse-example'
110+
},
111+
include_package_data=True, # required to get the non-.py data files in the wheel
117112
)

0 commit comments

Comments
 (0)