Skip to content

Commit e7f8f99

Browse files
committed
Add package_dir to setup.py and pyproject.toml
1 parent b85f6fa commit e7f8f99

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ dev = [
3636
]
3737

3838
[tool.setuptools]
39+
package-dir = { "" = "src" }
3940
package-data = { no_code = ["py.typed"] }
4041

4142
[tool.setuptools.dynamic]

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@
66

77
SITE_PACKAGES = sysconfig.get_path("purelib").split(sys.prefix + os.sep)[1]
88

9-
setup(data_files=[(SITE_PACKAGES, ["src/no_code/no.pth"])])
9+
setup(
10+
package_dir={"": "src"},
11+
data_files=[
12+
(
13+
SITE_PACKAGES,
14+
["src/no_code/no.pth"],
15+
),
16+
],
17+
)

0 commit comments

Comments
 (0)