4 ms·
Could you elaborate on the issues you have with the current system?
by dalke 10y ago
Could you elaborate on the issues you have with the current system?
- yxhuvud 10y agoIs there anything that even remotely comes close to bundler in power and ease of use? Suppose for example that I want to upgrade a package and all packages that it depends on, how would that be done? Or suppose I have different environments a project can be run in that should load slightly different set of dependencies?
- StavrosK 10y ago> Is there anything that even remotely comes close to bundler in power and ease of use? Yes, pip, since before bundler existed. > Suppose for example that I want to upgrade a package and all packages that it depends on, how would that be done? pip install --upgrade package > suppose I have different environments a project can be run in that should load slightly different set of dependencies? venv activate myproject
- actsasbuffoon 10y agoThere's a bit that's still lacking in Pip. For instance, Pip only installs new packages into your venv, rather than trying to keep it synchronized. I've run into bugs where someone ripped a library out of requirements.txt because they thought it wasn't being used any longer. Turns out it was still being used, but the dev couldn't tell because the lib was still in their venv. Tools like Bundler will actually take the dependency away from you. Python's packaging system is great compared to C, but it's primitive compared to Ruby, Haskell, Clojure, and lots of others.
- chronial 10y agohttps://github.com/nvie/pip-tools https://github.com/nvie/pip-tools solves this by providing pip-sync, which will uninstall removed packages.
- Nullabillity 10y ago> Is there anything that even remotely comes close to bundler in power and ease of use? Maven and co. > Suppose for example that I want to upgrade a package and all packages that it depends on, how would that be done? Change the version number in pom.xml/build.sbt/build.gradle. Done. > Or suppose I have different environments a project can be run in that should load slightly different set of dependencies? Define a new project that depends on your main project and the extra dependencies.
- yxhuvud 10y agoAh yes. The question was about the Python ecosystem. There are other good solutions for other platforms.
- krakensden 10y agoBundlers default-global behavior is a disaster. Last time I got hired at a ruby shop none of the scripts worked, most projects didn't have a lock file, etc. Because they just ran the things directly, using whatever from the global environment.
- sametmax 10y agoHaving to explain the concept of virtualenv is still a pain compared to local install à la node. "How do I make an exe" with my PyQT app is still a very hard question to answer. Web deployment is still hard in Python because of lack of general hosting support if you don't own your server. The situation is way better, and I'm very glad of the work done, but it has still a long way to go.
- mwcampbell 10y ago> Web deployment is still hard in Python because of lack of general hosting support if you don't own your server. Does conventional shared hosting actually matter anymore, for application developers as opposed to someone just running a WordPress site? Virtual private servers are just as cheap now.
- sametmax 10y agoYes it does, because a lot of people needing to deploy tools are not dev.
- jsmthrowaway 10y ago> Web deployment is still hard in Python because of lack of general hosting support if you don't own your server. GAE? PythonAnywhere? Heroku? OpenShift? Docker-based stuff? https://wiki.python.org/moin/SpecializedCommercialHosts https://wiki.python.org/moin/SpecializedCommercialHosts maybe? https://wiki.python.org/moin/OtherCommercialHosts https://wiki.python.org/moin/OtherCommercialHosts if that wasn't enough?
- sametmax 10y ago0.1% if the commercial offer for PHP, and they all involve using the command line or know a bit about coding. Again, it's better, but many people I know run PHP business with zero coding knowledge. They upload to ftp scripts they bought on the web, and make a living out of it. Some are kids trying stuff. The little things matter.
- pvg 10y agoIt's a good summary of the context, history and tools that have been cleaned up but sweeps an awful lot under the rug with "Then, for each project you want to do, make a new virtualenv [...]". What's that and why are you doing it? Oh, because the packaging doesn't work.
- empthought 10y agoThe packaging works fine. Do all Java apps running on a host use the same classpath pointing to /usr/lib directories full of JAR files? Of course not. That's all that virtualenv is doing; the equivalent of managing /lib directories for an invocation of the interpreter.
- pvg 10y agoI don't follow how these are at all similar other than you saying they are 'equivalent'. Typical java apps get their dependencies from the same maven-managed local repo. The tool itself is baroque but conceptually this is much simpler than creating magical 'environments' - the repository of dependencies, what dependencies a particular app uses and what version of the runtime it's invoked with are all separate and orthogonal to each other. An even simpler way to think about it - imagine you just invented python and are designing the tooling around dependency management and packaging. Would you come up with 'environments'?
- empthought 10y ago> Typical java apps get their dependencies from the same maven-managed local repo. What? No, they don't. Typical Java apps are deployed on systems that don't even have Maven installed. Typical Java apps are executed with a classpath argument pointing to the libraries installed for the application. What are the directories containing those JARs (or an uberjar) except an "environment?" Hell, the Java classloader interacts with the classpath in pretty much the exact same way that the Python interpreter interacts with a virtualenv.
- Anderkent 10y agoDeploying a python application is still a horrible experience. My best attempts so far involve doing `pip wheel` during the build, then discarding anything that's platform dependent and fetching their source dists instead, then bundling that together with a script that sets up a virtualenv and installs all these dependencies and the project being installed ... Compare to a jvm uberjar.
- brianwawok 10y agoExcept Python you can often run from git. Git pull do some pip done.
- shadowmint 10y agoTo be fair, you need a python runtime installed to run python, the same way you need a java runtime installed to run uberjars. ...but, the deployment is a single artifact. I don't think doing a git clone, followed by a pip install and waiting for all the dependencies to download... and compile... (or not, if you have the wrong system packages installed) really compares.
- brianwawok 10y agoWhy not? If you are doing a blue/green type deploy.. you are basically building up a new VM to be your new environment. It can do all kinds of download and compile type stuff. Who cares if some is pip installing?
- Eridrus 10y agoYou can do the same things in Java land as long as you have used a build system written in the last decade such as Maven or Gradle, you can just as easily pull down a git repo and run mvn package
- brianwawok 10y agoWell that is a) A 30 sec - 10 minute process to build (vs 0 in python) b) Weird because Java has a fatjar concept. Python and Java are different. The easy path to deploy them doesn't need to be the same. You may need to make them the same for ops sanity.. but if you are just doing 1 or the other, meh
- _rs 10y agopip doesn't even use a solver to determine which packages to install, it just uses the first mention it finds.