Skip to content

Commit

Permalink
Merge pull request #187 from microbiomedata/fix-wheel-project-files
Browse files Browse the repository at this point in the history
Ensure that project artifacts are included in wheel distribution
  • Loading branch information
pkalita-lbl authored Mar 5, 2024
2 parents f60021a + 7177302 commit a987e84
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
poetry dynamic-versioning
make gen-project
make project/json/nmdc_submission_schema.json
cp -r project src/nmdc_submission_schema
- name: Build source and wheel archives
run: poetry build
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,8 @@ dmypy.json
.pyre/

/examples/output

# A copy of the project directory is moved here
# temporarily before `poetry build`. This is to
# make sure we don't commit the copy.
src/nmdc_submission_schema/project
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ description = "The home of the NMDC submission schema. *Not* the home of sheets_
authors = ["Mark Andrew Miller <[email protected]>"]
license = "MIT"
readme = "README.md"
include = ["README.md", "src/nmdc_submission_schema/schema", "project"]
include = [
# These files are copied from the top-level project folder at build time. Without
# the copy step they end up in a weird location when installed via wheel.
# See: https://github.com/python-poetry/poetry/issues/7153
{ path = "src/nmdc_submission_schema/project/**/*", format = [ "sdist", "wheel" ] }
]

# note that the nmdc-schema is not imported as a module,
# but one file from the nmdc-schema is accessed via sheets_and_friends/tsv_in/import_slots_regardless.tsv
Expand Down
Empty file.

0 comments on commit a987e84

Please sign in to comment.