-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
setuptools doesn't install licenses #357
Comments
Would it be possible to have a |
The license file already comes included in the sdist (barring any mishaps by the author). As for wheels, you can add |
It appears that unless the license file is explicitly mentioned in the manifest, it will NOT be included (just tested with setuptools 36.5.0 / distutils from Py 3.6). This is also the behavior documented in https://docs.python.org/3.6/distutils/sourcedist.html#specifying-the-files-to-distribute. But as you point out yourself, it is easy enough for setuptools to find that information: it should read it from setup.cfg's metadata.license_file, to avoid having to duplicate it. |
I think this is a reasonable enhancement. The new behavior should be that There's a case to be made for including anything called |
Working on this as part of PyPA Sprint Weekend at Bloomberg (2018) |
Addressing pypa#357 `python setup.py sdist` now includes the license file if `license_file` is included in `setup.cfg` unless it is explicitly excluded in `MANIFEST.in`. Co-Authored-By: Poyzan Nur Taneli <[email protected]>
Addressing pypa#357 `python setup.py sdist` now includes the license file if `license_file` is included in `setup.cfg` unless it is explicitly excluded in `MANIFEST.in`. Co-Authored-By: Poyzan Nur Taneli <[email protected]>
Addressing pypa#357 `python setup.py sdist` now includes the license file if `license_file` is included in `setup.cfg` unless it is explicitly excluded in `MANIFEST.in`. Co-Authored-By: Poyzan Nur Taneli <[email protected]>
Addressing pypa#357 `python setup.py sdist` now includes the license file if `license_file` is included in `setup.cfg` unless it is explicitly excluded in `MANIFEST.in`. Co-Authored-By: Poyzan Nur Taneli <[email protected]>
Co-Authored-By: Poyzan Nur Taneli <[email protected]>
Eventually, we should get setuptools to include this in the .tar.gz file (see pypa/setuptools#357), and then we won't need to include it here.
* add pip * fix * some gl fixes * fix * added trio-asyncio [skip appveyor] * vendor -> vend * fix url * Update recipes/pylbm/meta.yaml Co-Authored-By: Chris Burr <[email protected]> * Update recipes/pylbm/meta.yaml Co-Authored-By: Chris Burr <[email protected]> * python-backtrace * rm setuptools dep * add license * add LICENSE.txt to recipe folder * better deps * Removed recipes (atlite, python-backtrace) after converting into feedstocks. [ci skip] * Removed recipe (pylbm) after converting into feedstock. [ci skip] * Removed recipe (libhomfly) after converting into feedstock. [ci skip] * fix stuff * fixed meta * Add libbraiding * xontrib-readable-traceback * add license * Removed recipe (trio-asyncio) after converting into feedstock. [ci skip] * Add C++ compiler * trio-aiohttp * Removed recipe (libbraiding) after converting into feedstock. [ci skip] * fix test * more fixes * more fixes * libxkbcommon * added build * forgot sha256 * another couple of thinks * don't run pytest The tests are not in the dist. They do pass in GitLab CI for this release: https://gitlab.com/deltares/imod/imod-python/pipelines/57198406 * python req * more deps * more build * add pkg-config * cflags * -lxcb * xontrib-ssh-agent * Added recipe for pycomlink based on example * Initial work setting up GPI framework * Removed recipe (xontrib-ssh-agent) after converting into feedstock. [ci skip] * Fixed wrong sha256 has of source tab ball Strangely the source tar ball downloaded via "curl -O URL" is different (wrong in this case) from the hash of the file that is downloaded via the browser. Or maybe I did something wrong... * rm packages * typo in license Co-Authored-By: jakirkham <[email protected]> * removed pip install flags * Removed recipes (pycomlink, trio-aiohttp) after converting into feedstocks. [ci skip] * Regenerate with upstreamed RPM skeleton fixes * add yum_requirements.txt * Removed recipe (libxkbcommon) after converting into feedstock. [ci skip] * quart-trio * added libxkbcommon * xorg-libxinerama * Removed recipe (imutils) after converting into feedstock. [ci skip] * Removed recipe (quart-trio) after converting into feedstock. [ci skip] * some minor fixes * harfbuzz isn't built correctly to support mac here * Add xrviz * correct deps * Removed recipe (imod) after converting into feedstock. [ci skip] * Removed recipe (deepxde) after converting into feedstock. [ci skip] * Removed recipe (kitty) after converting into feedstock. [ci skip] * try again * use release * xkeyboard-config * google-pasta * remove extra about/home entry * Removed recipe (google-pasta) after converting into feedstock. [ci skip] * add rio-cogeo and supermercado * don't build py<3.3 * remove rasterio from build * Removed recipes (rio-cogeo, supermercado) after converting into feedstocks. [ci skip] * add nbgitpuller * Removed recipe (nbgitpuller) after converting into feedstock. [ci skip] * Revert "Initial work setting up GPI framework" This reverts commit d095a7d. * Add several aio-libs projects * aiohttp_jinja2 -> aiohttp-jinja2 * more underscore fixes * Removed recipes (aiohttp-debugtoolbar, aiohttp-jinja2, aiohttp-security, aiohttp-session, aiomcache, aioredis, janus) after converting into feedstocks. [ci skip] * Adding recipe for urbansim_defaults * Add switch-model recipe * Update requirements * Fix test/source_files section * Removed recipe (urbansim_defaults) after converting into feedstock. [ci skip] * Recipe for coq-jupyter * Add newline at end of meta.yaml * Adding recipe for PyCRC * Fix imports * Removed recipe (pycrc) after converting into feedstock. [ci skip] * Create pypd meta.yaml file * Add pypd LICENSE * Removed recipe (pypd) after converting into feedstock. [ci skip] * Added GPI build recipe * Removed python dependency in run * Reordered sections in meta.yaml * Changed XORG packages to conda-forge deps * Don't use xvfb for testing on osx * Fix case on selector for skipping windows * windse recipe test 1 * Adding recipe for pyFirmata * Removed recipe (coq-jupyter) after converting into feedstock. [ci skip] * Use underscores in package name and pypi download path * adding meta.yml for first go at recipe Signed-off-by: Vanessa Sochat <[email protected]> * try without dash in name Signed-off-by: Vanessa Sochat <[email protected]> * doh, needs to be yaml Signed-off-by: Vanessa Sochat <[email protected]> * Fix full license name * Rename directory to switch_model, not switch-model * missing yaml Signed-off-by: Vanessa Sochat <[email protected]> * add to other list Signed-off-by: Vanessa Sochat <[email protected]> * oh, its pyyaml Signed-off-by: Vanessa Sochat <[email protected]> * Don't build for Python 3 * Add license file Eventually, we should get setuptools to include this in the .tar.gz file (see pypa/setuptools#357), and then we won't need to include it here. * first successful build using .circleci/run_docker_build.sh * removed empty lines at the end of windse/meta.yaml * whoops, removed one line too many * third times a charm? * missing spython Signed-off-by: Vanessa Sochat <[email protected]> * skipping windows * Removed recipe (pyfirmata) after converting into feedstock. [ci skip] * Removed recipe (gpi-framework) after converting into feedstock. [ci skip] * Update recipes/windse/meta.yaml Co-Authored-By: Uwe L. Korn <[email protected]> * Add recipe for seekpath * Use tests and license from .tar file (starting with 2.0.3.1) * Remove `noarch` tag to avoid building for Python 3 * Removed recipe (seekpath) after converting into feedstock. [ci skip] * Enforce python < 3 without using #skip * correct Python version identifier * Update sha256 for .tar.gz file * New meta.yaml for pyeviews * Add more commands to diagnose import error in tests. * Another diagnostic command. * Keep a copy of switch_model for run_tests.py * Add switch entry point * Update for Switch 2.0.4 (Python 3 compatible) * Removed recipe (windse) after converting into feedstock. [ci skip] * Add recipes for http3 and requests-async * Fix licenses * Removed recipe (ifcopenshell) after converting into feedstock. [ci skip] * Removed recipes (http3, requests-async) after converting into feedstocks. [ci skip] * Removed recipe (switch_model) after converting into feedstock. [ci skip] * testing updated version Signed-off-by: Vanessa Sochat <[email protected]> * Removed recipe (xrviz) after converting into feedstock. [ci skip] * dont support windows Signed-off-by: Vanessa Sochat <[email protected]> * remove redundancy Signed-off-by: Vanessa Sochat <[email protected]> * add sat-stac * remove pyaml and spython Signed-off-by: Vanessa Sochat <[email protected]> * Removed recipe (sat-stac) after converting into feedstock. [ci skip] * add sat-search * Update recipes/xontrib-readable-traceback/meta.yaml Co-Authored-By: Chris Burr <[email protected]> * Update recipes/xontrib-readable-traceback/meta.yaml Co-Authored-By: Chris Burr <[email protected]> * python-backtrace * Removed recipe (sat-search) after converting into feedstock. [ci skip] * Update recipes/singularity-compose/meta.yaml Co-Authored-By: Chris Burr <[email protected]> * Removed recipe (xontrib-readable-traceback) after converting into feedstock. [ci skip] * Removed recipe (singularity-compose) after converting into feedstock. [ci skip] * Render with rpm2cpio removed This change has already landed in conda-build. So here we are just regenerating the conda-build recipe with this change. * Comment out tests to workaround a conda-build bug * added perl-xml-parser req * New meta.yaml for pyeviews * Delete meta.yaml * libxkbfile * Removed recipe (libxkbfile) after converting into feedstock. [ci skip] * added libxslt dep * pkg-config * Updated recipe maintainer * Updated run requirements * Add myself as a maintainer * move deps to build env * Removed recipe (xkeyboard-config) after converting into feedstock. [ci skip] * Initial recipe for sphinx_gmt Missing the SHA hash and doesn't list GMT as a dependency. * Add hash of the pypi tarball * Remove noarch * Add recipe for httpcore This is a little confusing, because the package has changed name to http3, but older versions were released as httpcore. httpcore is a dependency to build request-async: conda-forge/requests-async-feedstock#2 (comment) * Removed recipe (httpcore) after converting into feedstock. [ci skip] * Add bespon and codebraid * adding deid recipe Signed-off-by: Vanessa Sochat <[email protected]> * typo Signed-off-by: Vanessa Sochat <[email protected]> * Add codebraid python version restriction * Removed recipes (codebraid, deid) after converting into feedstocks. [ci skip] * Removed recipe (bespon) after converting into feedstock. [ci skip] * Add LICENSE * add recipe for pyreportjasper * Added license file name on meta.yaml * Require `openssl` version `1.1.1a` [skip ci] Appears we are not able to install some dependencies without `openssl` version `1.1.1a` installed (`1.1.1b` is already included). This tries forcing `openssl` to version `1.1.1a` to fix the issue. * Force `openssl` to `1.1.1a` first [ci skip] * Drop `openssl` install hacks [ci skip] These don't seem to work as expected either despite getting the seemingly required version of `openssl` installed. So just go ahead and drop them. * Add noarch back * Add recipe for pyjson5. * Add entry point metadata. * Removed recipes (libnl-cos6-x86_64, pyeviews, sphinx_gmt, vdom) after converting into feedstocks. [ci skip] * MSAL package * Rerender with latest conda-smithy * PsychoPy 3.x, add entrypoint, remove lots of test imports * Update recipe
I want to note that the license files only get included in a source distribution, but they are NOT installed with the package! On the other hand, when you build a wheel the license files are copied into the |
@EvgenKo423 Installation via |
No. Many packages on PyPI only provide a source distribution. I've tried building a source distribution of my own package with a It's clearly not a |
It's possible to build a wheel from a sdist. Setuptools will package licenses in the sdist as long as the package author listed them in their |
@EvgenKo423 At this point the way it works in
Hope that clears up the confusion. I recognize that invoking |
I was unable to reproduce this behavior. To confirm, when installing a package from source using pip, the license file does get installed:
|
@EvgenKo423 are you able to share a minimal reproducer? That might help point out what issues are being encountered and also help people here to provide more relevant advice for your use case 🙂 |
It all falls down to
Many users don't have your knowledge, I guess (but thanks for mentioning PEP 517). I currently have a |
Originally reported by: notting (Bitbucket: notting, GitHub: notting)
Ergo, setuptools should add the LICENSE or COPYING file to the egginfo/distinfo directory by default, so licenses get distributed automatically.
The text was updated successfully, but these errors were encountered: