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

Update dependency management docs #3364

Merged
merged 3 commits into from
Jun 13, 2022

Conversation

abravalheri
Copy link
Contributor

Summary of changes

  • Extract depencency_liks section to a new file:
    deprecated/dependency_links.rst
  • Add note about directly URLs not being accepted in PyPI.
  • Simplify intro about build system requirement.
  • Simplify intro about optional dependencies.
  • Fix confusion in example about "Project" and "Package".
  • "Demote" section about extras in entry-points to a note.

Pull Request Checklist

- Extract `depencency_liks` section to a new file:
  `deprecated/dependency_links.rst`
- Add note about directly URLs not being accepted in PyPI.
- Simplify intro about build system requirement.
- Simplify intro about optional dependencies.
- Fix confusion in example about "Project" and "Package".
- "Demote" section about extras in entry-points to a note.
@abravalheri abravalheri marked this pull request as ready for review June 12, 2022 14:48
docs/userguide/dependency_management.rst Outdated Show resolved Hide resolved
docs/userguide/dependency_management.rst Outdated Show resolved Hide resolved
docs/userguide/dependency_management.rst Outdated Show resolved Hide resolved
docs/userguide/dependency_management.rst Outdated Show resolved Hide resolved
@abravalheri abravalheri merged commit 43b515b into pypa:main Jun 13, 2022
@abravalheri abravalheri deleted the remove-dependency-links branch June 14, 2022 17:06
@dkondoetsy
Copy link

dkondoetsy commented Jun 24, 2022

@abravalheri thanks for this PR. Now that dependency_links is deprecated, is there an alternative way to specify a different non-pypi package index url [eg in artifactory/jfrog] to setuptools.setup()?

I've tried the install_requires argument to setuptools.setup() like so:

install_requires=[mypackage @ http://USER:PASSWORD@myhostname:8082/api/pypi/pypi/simple]

but install_requires seems to expect to download source code as a [.zip] archive.

Ideally, I'm looking for something equivalent to pip's extra-index-url setting, which is specifiable directly to setuptools.setup().

@abravalheri
Copy link
Contributor Author

Hi @dkondoetsy, I couldn't find anything in the latest packaging standards about mixing multiple package indexes together directly on the package specification. You need to use an external tool for that, like the pip configuration file, or a package index mirror/proxy like devpi (maybe bandersnatch also can do that?).

What is possible to do right now is to force a URL to a wheel file as covered in PEP 440/PEP 508. But as you have already noticed, it requires you to point to a specific file and don't allow for dynamic version resolution.

So the short answer is no, unfortunately there seems to be nothing in the packaging standards regarding that.

@dkondoetsy
Copy link

Thank you very much, @abravalheri, for your response and the other options you listed.

I will look into pointing to a wheel and appreciated the documentation you pointed to PEP 440.

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.

None yet

2 participants