-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry and capital letter in package names #1538
Comments
Hello, poetry is forced to rename package folder to lower case and replaces It looks a little bit counter intuitive that the I could change this behavior, in that way, that the |
I would argue that PEP 8 is a style guide. A widely accepted one, but still, nothing more than a suggestion. There are projects that use capital letters in their letters and this could prevent them from adopting poetry. That being said, even if there is some reason that poetry can't support mixed cases (filesystems that ignore cases?), the following output is wrong:
More specifically, this part:
|
Hello again, you can use camel case package names. But then you have to define it in the
See also here. And yes, the output message is incorrect. |
Great, thank you @finswimmer. |
Do you think we can close this issue, if my fix about showing the message correct is merged? |
I got the same problem in 1.0.0. @finswimmer fix worked for me. The message I got was a stack trace which was less than helpful. Still, the solution works so thank you. |
I would like to ask about reopening this issue to carefully consider the case for supporting capitalized package names. I am the author of the D47crunch package used by geochemists, and I am trying to switch to
I am a big fan of style guidelines, both for code and for writing in general, but I also believe it's important to know how/when to deviate from the default style. It would be great if there was a simple way to force preservation of the original capitalization, perhaps with a strongly worded warning pointing to PEP 8. If this is simply not technically possible and/or unacceptable on philosophical grounds, authors of existing capitalized packages will have to do without Thanks for hearing me out and for the great work you've done so far. |
@mdaeron My use case at the time was with acronyms for machines so As I said, @finswimmer fix worked for me: packages = [
{include = "PIF"}
] But it is more verbose. |
Oh great, I didn't realize that fix applied to the main package name and thought this was about dependencies. Thanks again! |
I just tested this for an upcoming package
Nevertheless, is there a way to avoid this renaming? |
@mdaeron I am afraid I will have to leave it to more knowledgeable people. I moved on from those projects and thus no longer have a need for capitalisation of packages. However, I do think (for what my opinion is worth) that poetry should support it despite PEP8. There are cases where it is essential to have capitalisation. |
I stumbled upon this issue recently during migration of a package from other dependency manager to |
For clarity, is it "poetry's" position that it is going to be very opinionated over package names and not allow uppercase characters? Further that it can be overridden if a project insists, but if that override were to work then it should also publish with the proper case, which seems to not be the case? Either way, it seems like there is a bug - either 1. poetry is insisting upon lower case and that was not intended or 2. package name override isn't honored when published to PyPi, .. or maybe BOTH? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).OS version and name: Linux D01RI1900987 4.15.0-66-generic Detect pyproject.toml changes and automatically run
poetry install
if needed #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxPoetry version: Poetry version 1.0.0b3
Issue
poetry does not seem to correctly handle packages with capital letters
create a new package
Inspect pyproject.
It correctly contains the capitalized name
Nevertheless, the created package is in lowercase...
Try to build a wheel - everything seems fine:
Use Capital letters
But if we rename the package to
myPackage
then there is an exception.Could this be something similar to #1303 - #1305?
The text was updated successfully, but these errors were encountered: