Skip to content

Commit 341afe6

Browse files
committed
integration: Fix integration files are not included
Also Broken at 929daf4
1 parent a8ba14b commit 341afe6

File tree

9 files changed

+19
-2
lines changed

9 files changed

+19
-2
lines changed

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,6 @@ version_scheme = "no-guess-dev"
8484
where = ["src"]
8585

8686
[tool.setuptools.package-data]
87-
integration = ["integration/*"]
87+
# A maps from PACKAGE NAMES to lists of glob patterns,
88+
# see also https://setuptools.pypa.io/en/latest/userguide/datafiles.html
89+
"sphinxnotes.snippet.integration" = ["*.*"]

src/sphinxnotes/snippet/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ def get_integration_file(fn:str) -> str:
3232
"""
3333
Get file path of integration files.
3434
35-
.. note:: files are included by ``setup(package_data=xxx)``
35+
.. seealso::
36+
37+
see ``[tool.setuptools.package-data]`` section of pyproject.toml to know
38+
how files are included.
3639
"""
40+
# TODO: use https://docs.python.org/3/library/importlib.resources.html#importlib.resources.files
3741
prefix = path.abspath(path.dirname(__file__))
3842
return path.join(prefix, 'integration', fn)
3943

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
sphinxnotes.snippet.integration
3+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4+
5+
Dummpy module for including package_data.
6+
7+
See also ``[tool.setuptools.package-data]`` section of pyproject.toml.
8+
9+
:copyright: Copyright 2024 Shengyu Zhang
10+
:license: BSD, see LICENSE for details.
11+
"""
File renamed without changes.

0 commit comments

Comments
 (0)