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

Improve support for alternative package repositories #908

Merged
merged 7 commits into from
May 22, 2019

Conversation

sdispater
Copy link
Member

@sdispater sdispater commented Feb 21, 2019

This PR aims at improving support for alternative repositories.

It introduces a way to specify which repository to use when looking for a dependency by providing a source like the following:

[tool.poetry.dependencies]
pendulum = {version = "^2.0", source = "custom-pypi"}

[[tool.poetry.source]]
name = "custom-pypi"
url = "https//example.com/simple"

TODO

  • Add support for specifying a source for a specific dependency
  • Improve installation from alternative repositories

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

@sdispater sdispater added area/solver Related to the dependency resolver area/installer Related to the dependency installer kind/feature Feature requests/implementations labels Feb 21, 2019
@sdispater sdispater added this to the 1.0 milestone Feb 21, 2019
@sdispater sdispater force-pushed the improve-alternative-repositories-support branch 3 times, most recently from b11426b to ead48e6 Compare February 28, 2019 10:07
@sdispater sdispater force-pushed the improve-alternative-repositories-support branch from 6aa9b27 to d78c3e0 Compare March 7, 2019 12:56
@HolgerPeters
Copy link

Since this is a draft, maybe its not too late to add some comment.

First of all, I like that you can configure from which repository a package should be pulled.

I feel like what I want in my daily life is probably a solution that is similar to what maven does for the Java world. Maven allows you to

  1. configure several repositories and give them a name with an identifier.
  2. configure mirrors for these repositories.

The config is a bit verbose and spread over pom.xml (for the repositories) and settings.xml (https://maven.apache.org/guides/mini/guide-mirror-settings.html), but I think one should be able to map it to nice toml syntax in principle.

Examples

Company Setup

Company uses packages from pypi and a local artifact store that contains their local builds, local-index. They run a pypi-cache on a local artifactory server, but if that service is unavailable they are perfectly happy to pull packages from pypi. So they would define two remote pypi repositories, one for pypi, one for local-index. For pypi, they define a local-pypi-mirror.

Self-built packages

A developer wants to have all packages built from source on their machines (so that they can profit from optimizations). They run a local devpi service, and upload packages to an index on that devpi using devpi-builder. They don't want a fallback to remote pypi, because that would mean pulling in artifacts that did not go through their build process.

@sdispater sdispater force-pushed the improve-alternative-repositories-support branch 3 times, most recently from b29d0bd to 77a75fa Compare May 16, 2019 20:04
@sdispater sdispater force-pushed the improve-alternative-repositories-support branch from 77a75fa to e8bdcc4 Compare May 22, 2019 20:12
@sdispater sdispater force-pushed the improve-alternative-repositories-support branch from 537057e to 156930c Compare May 22, 2019 20:51
@sdispater sdispater marked this pull request as ready for review May 22, 2019 21:17
@sdispater sdispater merged commit 694bef2 into develop May 22, 2019
@sdispater sdispater deleted the improve-alternative-repositories-support branch May 22, 2019 21:40
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/installer Related to the dependency installer area/solver Related to the dependency resolver kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants