-
Notifications
You must be signed in to change notification settings - Fork 76
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
Move non-library package data outside of Python package #72
Conversation
setup.cfg
Outdated
@@ -1,2 +1,5 @@ | |||
[bdist_wheel] | |||
universal = True | |||
|
|||
[metadata] | |||
license-file = LICENSE.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this license-file does exactly? (could not find it in the distutils documentation yet)
Unfortunately, it isn't well documented. Best "documentation" I can find is the related PR to the wheel package, here. With this, building the wheel package adds the
Notice the file
So, this is an established feature for bundling LICENSE files when installing Python packages. |
This is now documented in the Wheel documentation: https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file
|
I've updated the |
2 similar comments
1 similar comment
OK, thanks @jdufresne. I will accept this PR once I have checked all the files and resolved the conflict. I do not plan to make olefile a simple module as it was the case in the past, just because I might split the code into several files in the future. So it's easier if we already have a package structure. I know it looks a bit strange to have a package for a single module, but I'd prefer to keep it like this. Unless it creates actual issues, of course. Is that a problem? |
Nope no problem at all. Thanks for the response and considering. And thanks for maintaining the project. Rebased to resolve merge conflicts. |
This avoids having the files themselves installed as Python files used by the package. As these files are not used by the actual Python code, no need to install alongside the library. All files remain a part of the source package, are just not installed. The license file is now installed using the wheel package's supported method. Added to [metadata] to setup.cfg with the property license-file, with this, the license is now installed in to the dist-info directory.
Rebased to resolve merge conflicts. |
This avoids having the files themselves installed as Python files used by the package. As these files are not used by the actual Python code, no need to install alongside the library. All files remain a part of the
source package, are just not installed.
The license file is now installed using the wheel package's supported method. Added to
[metadata]
tosetup.cfg
with the propertylicense-file
, with this, the license is now installed in to thedist-info
directory.This change helps move towards the goal of distributing olefile as a single module instead of a package of one module. Once this can be achieved, there will be less indirection and unnecessary nested layersin the distribution. Moves toward a Python community conventions.