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

extend python package features #113

Merged
merged 1 commit into from
Dec 3, 2021
Merged

Conversation

g-arjones
Copy link
Contributor

@g-arjones g-arjones commented Nov 18, 2021

Fixes #106 and rock-core/autoproj#313

@moooeeeep Could you please test?

@moooeeeep
Copy link

This seems to work for me, thanks!

Any opinions against switching to pip install . --target=#{prefix} or similar (and potentially ditching the explicit build step)?

@g-arjones
Copy link
Contributor Author

I would prefer not to, for now af least. I'm in the middle of fixing a lot of things (haven't use the python stuff in a while) and I would have to stop to retest and reassess.

Is there a good reason to use pip for that? That's not what I've seen other build tools do.

@g-arjones
Copy link
Contributor Author

After a quick search it seems we get more control over what happens with setup.py so that's better to integrate. Also pip will try to manage dependencies and I want autoproj to be the tool doing that.

For a user, using pip sounds like a step forward but for a tool I would stick to setup.py

@moooeeeep
Copy link

moooeeeep commented Nov 22, 2021

You can avoid having pip download dependencies when you pass the --no-index flag I believe. Then it should only look among the packages that were already downloaded/installed.

Direct invocations of setup.py install are deprecated for more recent versions of setuptools (and further commands might follow). For example this deprecation warning is produced:

/path/to/ws/install/pip/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.  setuptools.SetuptoolsDeprecationWarning,

Related issue: #108

This workflow will probably keep working for some time. And if users stick to old versions of pip and setuptools (or rather maintain compatibility with the legacy build system), potentially even longer.
But the presence of an explicit setup.py file is optional these days. If people start to rely on this, define different build backends etc, they will run into problems with autobuild.

Most users will probably want to have their packages pip-installable anyways, so they potentially need to maintain their dependencies in several places. But then again, maybe they could also add their packages as pip osdeps and/or via a custom package index (directory).

For reference:

But I agree, this is a bigger topic. And I'm happy to see, that this PR seems to fix the immediate issue #106.

@g-arjones
Copy link
Contributor Author

I have removed the pytest test utility and left only the fixes for #106 and rock-core/autoproj#313

@g-arjones g-arjones merged commit b79711b into master Dec 3, 2021
@g-arjones g-arjones deleted the add_python_package_features branch December 3, 2021 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python_package installation fails because install path isn't on PYTHONPATH
3 participants