-
Notifications
You must be signed in to change notification settings - Fork 9
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
Proof-of-concept for using simple-repository instead of the non-standards based JSON API #10
base: master
Are you sure you want to change the base?
Conversation
…ards based JSON API
@@ -31,11 +31,21 @@ This will start up a Flask app, and will print out a line such as:: | |||
|
|||
You can then call pip with:: | |||
|
|||
pip install --index-url http://127.0.0.1:5000/ astropy | |||
pip install --index-url http://127.0.0.1:5000/simple/ astropy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also caused by some inflexibility on simple-repository-server
(at https://github.com/simple-repository/simple-repository-server/blob/main/simple_repository_server/routers/simple.py#L41).
There is no good reason for this limitation, but it would require some more thought than I have capacity for this evening 😴
@@ -40,43 +100,20 @@ def main(cutoff_date, port, quiet): | |||
|
|||
CUTOFF = parse_iso(cutoff_date) | |||
|
|||
INDEX = requests.get(MAIN_PYPI).content | |||
repo = DateFilteredReleases( | |||
HttpRepository(MAIN_PYPI), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to say: There is no real reason not to parameterise this now... it is something that has been asked for to support private indexes. (e.g. https://www.reddit.com/r/Python/comments/1cte019/comment/l4bh02p/ #8)
👋 @astrofrog (long time no see... hope you're doing well!)
I have been working on providing package repository infrastructure at work, and have built up a set of libraries that make building custom repositories child's play 😜. In fact, I thought I would test it out on your awesome
pypi-timemachine
, and include my <30min hack in this PR. The result is a fully functional prototype (though I was disappointed with the fact that implementing #7 wasn't so easy due to some inflexibility in thesimple-repository-server
router definition - I will refine that 😉)A huge advantage of the approach taken in this PR is that you no longer rely on the (original and non-standardised) JSON API, and instead are using the PEP-503++ goodness that is out there on PyPI already.
I doubt you actually want to merge this (just yet at least) - the
simple-repository
codebase is still in preview / not-yet-maintained stage, and I would be fine if you want to go ahead and close the PR without merge.