question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"examples" package erroneously installed

See original GitHub issue

Because 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mrjoescommented, Sep 19, 2018

Sounds good. The include option won’t work as all “batteries” are shipped as flask_admin.contrib sub-packages.

But sure, examples and tests can be safely removed.

0reactions
elvijscommented, Oct 21, 2018

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 of flask-admin).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found