How can I prevent a toxic substance from appearing in the .egg directory group?

Whenever I run tox, my repository directory fails with .egg directories. These are obviously necessary dependencies for my library that need to be installed in each of the virtual environments, but I do not want to see them. I am not sure why they do not fall under the .tox directory ...

I have not seen any advice on this matter online, so my questions are:

  • Is there a way to prevent these directories from appearing first?
  • If not, is there a simple (automated) way to clear all of these directories after running tox?

Here is an example of one of my Python libraries that has this problem: https://github.com/joshvillbrandt/goprohero

Thanks for your help!

+5
source share
1 answer

tl; dr: upgrade setuptools to the latest version and all of these directories will be created in one .eggs directory instead of the root of your project. (Probably greater than 7.0.)

Long story

I came across the same issue after I recently switched from running tox with Python 2.7 to running it with Python 3.4. A Google search found this tox.ini , which contains this dependency specification:

  setuptools>=7.0 # to avoid .egg directories 

Since 2.7, I don’t remember having to fight .egg directories. I checked which version of setuptools I had in my 2.7 installation and found 14.3. I checked what I had in my installation 3.4, and found 5.5.1 (yikes!). After upgrading to 14.3 in my 3.4 installation, the only thing I get is the only .eggs directory that contains all the directories that would otherwise be at the root of my project.

I can live with one .eggs directory.

+2
source

Source: https://habr.com/ru/post/1207849/


All Articles