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 installs into nested directories with a second build, and then installs the build directory #184

Closed
bb-migration opened this Issue Apr 7, 2014 · 9 comments

Comments

Projects
None yet
1 participant
@bb-migration

bb-migration commented Apr 7, 2014

Originally reported by: Anonymous


python3.3 setup.py build
running build
running build_py
creating build/lib
copying pkg_resources.py -> build/lib
copying easy_install.py -> build/lib
creating build/lib/setuptools
copying setuptools/__init__.py -> build/lib/setuptools
copying setuptools/dist.py -> build/lib/setuptools
[...]

python3.4 setup.py build
running build
running build_py
creating build/lib/build
creating build/lib/build/lib
creating build/lib/build/lib/setuptools
copying build/lib/setuptools/__init__.py -> build/lib/build/lib/setuptools
copying build/lib/setuptools/dist.py -> build/lib/build/lib/setuptools
[...]

then installing the package installs the build directory as well. this is a regression, I think introduced with 3.x.


@bb-migration

This comment has been minimized.

bb-migration commented Apr 7, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Yes. Sounds like a regression to me.

@bb-migration

This comment has been minimized.

bb-migration commented Apr 7, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


This regression seems to have happened between setuptools 3.3 and 3.4.

@bb-migration

This comment has been minimized.

bb-migration commented Apr 7, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Add test capturing overmatching in new find_packages. Ref #184.

@bb-migration

This comment has been minimized.

bb-migration commented Apr 11, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Exclude children of excluded parents when doing package discovery. Fixes #184.

@bb-migration

This comment has been minimized.

bb-migration commented May 2, 2014

Original comment by bert-ijff (Bitbucket: bert-ijff, GitHub: Unknown):


This fix now breaks one of my packages that uses a symbolic link to include some sub-package code from another project.
Maybe you can restrict the recursion blocker only to the 'build' directories, or add an option/parameter to disable the recursion blocker for a specific setup?

@bb-migration

This comment has been minimized.

bb-migration commented May 2, 2014

Original comment by arfrever (Bitbucket: arfrever, GitHub: arfrever):


Bert IJff: Would this patch work for you?:

--- setuptools/__init__.py
+++ setuptools/__init__.py
@@ -78,7 +78,7 @@
         """
         Return all dirs in base_path, relative to base_path
         """                                                                                                                                                 
-        for root, dirs, files in os.walk(base_path):                                                                                                        
+        for root, dirs, files in os.walk(base_path, followlinks=True):                                                                                      
             for dir in dirs:                                                                                                                                
                 yield os.path.relpath(os.path.join(root, dir), base_path)                                                                                   

@bb-migration

This comment has been minimized.

bb-migration commented May 2, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


That looks like the right fix to me. I'd like to expand the test suite to capture this requirement as well.

@bb-migration

This comment has been minimized.

bb-migration commented May 2, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


I've created #195 to track this additional regression.

@bb-migration

This comment has been minimized.

bb-migration commented May 2, 2014

Original comment by bert-ijff (Bitbucket: bert-ijff, GitHub: Unknown):


Arfrever, I applied the patch. Works like a charm.

Thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment