Skip to content
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
ghost opened this issue Apr 7, 2014 · 9 comments

Comments

@ghost
Copy link

ghost 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.


@ghost
Copy link
Author

ghost commented Apr 7, 2014

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


Yes. Sounds like a regression to me.

@ghost
Copy link
Author

ghost 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.

@ghost
Copy link
Author

ghost commented Apr 7, 2014

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


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

@ghost
Copy link
Author

ghost commented Apr 11, 2014

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


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

@ghost
Copy link
Author

ghost 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?

@ghost
Copy link
Author

ghost 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)                                                                                   

@ghost
Copy link
Author

ghost 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.

@ghost
Copy link
Author

ghost commented May 2, 2014

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


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

@ghost
Copy link
Author

ghost 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!!

@ghost ghost added critical bug labels Mar 29, 2016
@ghost ghost closed this as completed Mar 29, 2016
jaraco added a commit that referenced this issue Mar 29, 2016
Update documentation for ``Requirement``.
jiongle1 pushed a commit to scantist-ossops-m2/setuptools that referenced this issue Apr 9, 2024
jiongle1 pushed a commit to scantist-ossops-m2/setuptools that referenced this issue Apr 9, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants