4 ms·
FWIW, resolution in Python is significantly harder than for Ruby, JS or Elixir because it requires cloning down each dependency. To really speed it up, what's n
by greysteil 8y ago
FWIW, resolution in Python is significantly harder than for Ruby, JS or Elixir because it requires cloning down each dependency. To really speed it up, what's needed is a registry API that provides all of the details for resolution. That's much harder for Python because of the legacy of setup.py, which allows version resolution to depend on arbitrary system considerations.
- X-Istence 8y agoTools such as Poetry and others expect that information to be available on PyPI, so long as you are using a newer version of setup tools and use twine to upload.
- wuliwong 8y agoI've never really delved deeply into package management. I've been using ruby for a while and using rbenv has made it pretty painless for a while. I've been using pipenv on my local machine but then switched to virtualenv in my ec2 deployments (because all the tutorials used it). What makes it easier for ruby? Is there just this "registry API" that has gained enough traction that everyone uses it?
- ProblemFactory 8y agoThe fundamental problem with Python dependencies is that they are calculated while executing setup.py, not declared statically. For example, the popular scikit-learn package has the following in its setup.py: if platform.python_implementation() == 'PyPy': SCIPY_MIN_VERSION = '1.1.0' NUMPY_MIN_VERSION = '1.14.0' else: SCIPY_MIN_VERSION = '0.13.3' NUMPY_MIN_VERSION = '1.8.2' and these are used to request dependencies from the resolver/downloader. You could have more dynamic dependencies that vary based on system libraries and tools installed on the machine where you are running it, or even the current weather. Until this is replaced by static version numbers, and all popular packages adopt it, a registry API cannot exist as it needs to run code on your machine to figure out the dependencies.