News for hackers. Stuff that matters.
Re:How We Deploy Python Code by emidln on Thursday July 09, 2015 @07:42PM (#9861441)
Pair this with virtualenvs in separate directories (so that "rollback" is just a ssh mv and a reload for whatever supervisor process) and you get to skip the mess of building system packages.

Also, are there seriously places that don't run their own PyPI mirrors? Places that have people who understand how to integrate platform-specific packages but can't be bothered to deploy one of the several PyPI-in-a-box systems or pay for a hosted PyPI?

Re:How We Deploy Python Code by toomuchtodo on Thursday July 09, 2015 @07:51PM (#9861485)
> Also, are there seriously places that don't run their own PyPI mirrors? Places that have people who understand how to integrate platform-specific packages but can't be bothered to deploy one of the several PyPI-in-a-box systems or pay for a hosted PyPI?

Yes. I've seen them, and they've been huge shops.

Re:How We Deploy Python Code by viraptor on Thursday July 09, 2015 @11:13PM (#9862102)
> you get to skip the mess of building system packages.

Only in cases where you don't have wheels depending on external libraries. If you do, you should still package with the right dependency constraints. Otherwise you can install a wheel which does not work (because of missing .so)

Re:How We Deploy Python Code by emidln on Friday July 10, 2015 @05:01AM (#9862937)
This simply isn't true. You can package .so or .dll (or anything else) with your wheel. An example of doing it with a dll or so is here: http://stackoverflow.com/questions/24071491/how-can-i-make-a...
Re:How We Deploy Python Code by viraptor on Friday July 10, 2015 @07:15AM (#9863240)
What you said does not disagree with me. You can have wheels depending on external dynamic libs. Or you can package them together. Both ways have good and bad sides, but if you leave them external, it's very useful to have the right dependencies.
Re:How We Deploy Python Code by vamega on Thursday July 09, 2015 @08:03PM (#9861527)
Can you point me to your recommended PyPI-in-a-box system?
Re:How We Deploy Python Code by kbrownlees on Thursday July 09, 2015 @08:25PM (#9861629)
I have had good success with http://doc.devpi.net/latest/
Re:How We Deploy Python Code by vamega on Thursday July 09, 2015 @08:53PM (#9861731)
That looks good. Might work exceptionally well for my needs. I want to have a PyPI mirror in an environment that doesn't have public internet access.

Running devpi in another environment and syncing the resulting repository should allow me to achieve what I want.

Re:How We Deploy Python Code by ronjouch on Thursday July 09, 2015 @11:00PM (#9862066)
As a first step, what about trying pip's `-f` option, combined with dumping your wheels in a dumb folder served by apache/nginx:

    pip --help
    [...]
    Install Options:
      [...]
      -f, --find-links <url>      If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory,then look for archives in
                                  the directory listing.
EDIT: in the context of deploying some app at work, what's the interest of a full-blown hosted cheeseshop? Users of these solutions, what value does it add to a simple `pip install -f INTERNAL_PKG_URL pkg_a==1.2.3 pkg_b==0.1.2` ? Which features do you frequently use?
Re:How We Deploy Python Code by emidln on Thursday July 09, 2015 @08:05PM (#9861540)
I currently use this one: https://localshop.readthedocs.org/en/latest/installing.html

It works. It's django based and you can setup s3-backed storage. It also has a docker-compose script.

Re:How We Deploy Python Code by doki_pen on Thursday July 09, 2015 @09:48PM (#9861881)
We migrated off of localshop and onto devpi. Devpi is a much better product and much more actively maintained. localshop was nothing but headaches and constantly breaking.
Re:How We Deploy Python Code by mvantellingen on Friday July 10, 2015 @09:09AM (#9863712)
Author here: I created it to solve an issue I was running into a couple of years ago. I've only recently started using it again myself. I think the development version (not on pypi) is in much better shape with things like multiple repositories and better user management (teams).
Re:How We Deploy Python Code by emidln on Thursday July 09, 2015 @10:31PM (#9862002)
Maybe you use more esoteric features. The only thing I've done in the last 18 months is patch a bug that prevented uploads from Python 2.7.4-2.7.10. We just run it under circus with chaussette and front it with an elb.
Re:How We Deploy Python Code by kbar13 on Friday July 10, 2015 @01:19AM (#9862415)
localshop has significantly improved in the past few months. Before I could barely consider it production-ready.
Re:How We Deploy Python Code by vamega on Thursday July 09, 2015 @08:55PM (#9861737)
Do I understand this correctly? It only mirrors the packages that are requested from it? So I won't need to download 100GB+ of packages that I am not interested in?
Re:How We Deploy Python Code by emidln on Thursday July 09, 2015 @10:27PM (#9861990)
Correct. My team has two main use cases: private packages and guaranteed access to packages we've built with. It's extremely frustrating to come into a codebase after several months or years to find it using a library that no longer seems to exist on the public internet.