"examples" package erroneously installed
See original GitHub issueBecause there’s an examples/__init__.py
file in the repo, this line of setup.py is erroneously deciding to install two packages, flask-admin
and examples
. I suspect other packages make this same mistake, which can lead to some file conflicts during installation.
It would be best to either change your find_packages
invocation to blacklist exclude
:
find_packages(exclude=['examples', 'examples.*'])
Or (and this is how I would do it to avoid this problem in the future) or to whitelist flask_admin
:
find_packages(include=['flask_admin'])
I would also go further and also blacklist flask_admin.tests
, since I think tests should not be part of the installation:
find_packages(include=['flask_admin'], exclude=['flask_admin.tests.*'])
But I think just not shipping the examples
package is a good start.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Remove a package with its dependencies that are not ...
For example, I wrongly installed a package (Virtualenv or SystemGlobal) and then I realized I don't need that, Only footage I can see...
Read more >pip cannot uninstall <package>: "It is a distutils installed project"
This error means that this package's metadata doesn't include a list of files that belong to it. Most probably, you have installed this ......
Read more >Testing your python package as installed - Paul Ganssle
This happens because setuptools expects you to list every package you want to install and it will not recursively include nested submodules.
Read more >Hunting Malicious npm Packages | Decipher - Duo Security
Duo Labs analyzes npm packages and how attackers can use malicious packages to gain access to and control over systems.
Read more >Resolving AIX Open Source RPM Package and ... - IBM
If there is a problem with installing rpm.rte, or executing the rpm binary file, open an AIX Case (See the following C section)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sounds good. The
include
option won’t work as all “batteries” are shipped asflask_admin.contrib
sub-packages.But sure, examples and tests can be safely removed.
Good point.
For what it’s worth, I think that explicitly whitelisting
flask-admin
is the cleanest solution (as long as tests are moved out offlask-admin
).