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

use distutils.core.run_setup to extract more complete package information #22

Closed

Conversation

dirk-thomas
Copy link
Member

@dirk-thomas dirk-thomas commented Oct 21, 2019

This implements the patch proposed in colcon/colcon-core#215 in this package instead.

colcon-ros needs to be updated to use the new API instead of the now deprecated API.

@rotu I used your name as the author of the commit since this is basically just a port of your proposed patch. Let me know if you want me to change it.

@dirk-thomas dirk-thomas added bug Something isn't working in progress Actively being worked on (Kanban column) labels Oct 21, 2019
@dirk-thomas dirk-thomas self-assigned this Oct 21, 2019
@rotu
Copy link
Contributor

rotu commented Oct 21, 2019

Thank you. I approve :-)

@dirk-thomas
Copy link
Member Author

This is still failing for me:

AttributeError: Can't get attribute 'run_setup_py' on <module 'colcon_python_setup_py.package_identification.python_setup_py' from '.../colcon_python_setup_py/package_identification/python_setup_py.py'>

@rotu
Copy link
Contributor

rotu commented Oct 23, 2019

I think either def run_setup_py needs to be in another file or the ProcessPool should be created after the module is fully imported (instead of during). I prefer the latter, in a file with minimal imports.

@rotu
Copy link
Contributor

rotu commented Oct 23, 2019

I can give this some attention tomorrow

@dirk-thomas
Copy link
Member Author

With this patch I am unable to cleanly abort a running build using Ctrl-C. I would suspect the usage of multiprocessing to be the cause for it. That is probably why the current extension uses just a subprocess and prints the repr() of the result and then evaluates the string to retrieve the data.

@rotu
Copy link
Contributor

rotu commented Oct 23, 2019

Shoot. I suppose having a process pool with module lifespan is fraught with problems... adjusting the code

@dirk-thomas
Copy link
Member Author

Just for the record: #24 targets this branch.

@dirk-thomas
Copy link
Member Author

dirk-thomas commented Feb 27, 2020

@rotu Please see an alternative PR #30 which uses distutils.core.run_setup() but doesn't switch the logic to use multiprocessing.

@dirk-thomas dirk-thomas closed this Mar 5, 2020
Copy link

@kaptenkece kaptenkece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python setup.py

@dirk-thomas
Copy link
Member Author

@kaptenkece I don't know what you want say with your comment. Please clarify.

@dirk-thomas dirk-thomas removed the in progress Actively being worked on (Kanban column) label Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

3 participants