Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Poetry for packaging #266

Closed
JWCook opened this issue May 9, 2021 · 4 comments · Fixed by #267
Closed

Use Poetry for packaging #266

JWCook opened this issue May 9, 2021 · 4 comments · Fixed by #267
Labels
logistics CI builds, project config, refactoring, and other logistical details question
Milestone

Comments

@JWCook
Copy link
Member

JWCook commented May 9, 2021

I'm a fan of poetry, and I'd potentially like to use it for packaging this library if possible.

@jayvdb My main hesitation with this is what you mentioned in #221, regarding poetry making it inconvenient to run tests for downstream packaging. Have you found any good solutions (or compromises) for this in any of the other projects you've worked with?

@JWCook JWCook added enhancement question logistics CI builds, project config, refactoring, and other logistical details labels May 9, 2021
@jayvdb
Copy link

jayvdb commented May 9, 2021

Perhaps use poetry for everything except create the sdist with another tool which includes the tests? Previously I have used @dephell for that, but it is abandoned.

@JWCook
Copy link
Member Author

JWCook commented May 9, 2021

After doing a bit more digging, I think we can make this work by using the include option (roughly equivalent to MANIFEST.in, if I understand correctly) instead of packages. Also, the per-format packages support added in python-poetry/poetry#1133 appears to also apply to include, although I don't see that in the docs yet.

Example:

include = [
    { path = "tests", format = "sdist" }
]

I noticed this in poetry's own pyproject.toml, recently updated as a result of python-poetry/poetry#3952.

Here's an example artifact I built using this config:
requests-cache-0.7.0.dev1.tar.gz

That appears to correctly include tests/ without installing it as a package. Does that look correct to you?

@JWCook JWCook removed the enhancement label May 9, 2021
@jayvdb
Copy link

jayvdb commented May 9, 2021

looks good!

@JWCook JWCook added this to the v0.7 milestone May 10, 2021
@JWCook
Copy link
Member Author

JWCook commented May 10, 2021

Sweet! I finished and merged these changes to master. The next release will probably be in about a month or two, fyi.

@JWCook JWCook changed the title Use Poetry for packaging? Use Poetry for packaging Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logistics CI builds, project config, refactoring, and other logistical details question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants