ambitious-student-81104
09/10/2021, 3:05 PMmodern-wolf-36228
09/10/2021, 3:06 PMmodern-wolf-36228
09/10/2021, 3:07 PMambitious-student-81104
09/10/2021, 3:07 PMhappy-kitchen-89482
09/10/2021, 3:07 PMambitious-student-81104
09/10/2021, 3:10 PMambitious-student-81104
09/10/2021, 3:11 PMpip install -r constraints.txt
?happy-kitchen-89482
09/10/2021, 3:13 PMhappy-kitchen-89482
09/10/2021, 3:14 PM--no-process-execution-local-cleanup
happy-kitchen-89482
09/10/2021, 3:14 PMhappy-kitchen-89482
09/10/2021, 3:14 PMhappy-kitchen-89482
09/10/2021, 3:14 PMhappy-kitchen-89482
09/10/2021, 3:15 PMhappy-kitchen-89482
09/10/2021, 3:15 PMpip install -r constraints.txt
happy-kitchen-89482
09/10/2021, 3:15 PMambitious-student-81104
09/10/2021, 3:18 PMhappy-kitchen-89482
09/10/2021, 3:22 PMambitious-student-81104
09/10/2021, 3:22 PMpip install -r constraints.txt
(without force reinstall) took 342s, pants resolve constraints usually takes 300-400shappy-kitchen-89482
09/10/2021, 3:23 PM--no-process-execution-local-cache
to force stuff to rerunhappy-kitchen-89482
09/10/2021, 3:23 PMambitious-student-81104
09/10/2021, 3:24 PMhappy-kitchen-89482
09/10/2021, 3:24 PMhappy-kitchen-89482
09/10/2021, 3:24 PMhappy-kitchen-89482
09/10/2021, 3:24 PMhappy-kitchen-89482
09/10/2021, 3:25 PMambitious-student-81104
09/10/2021, 3:26 PMhundreds-father-404
09/10/2021, 3:33 PMambitious-student-81104
09/10/2021, 3:34 PMsdist
in the pants repoambitious-student-81104
09/10/2021, 3:35 PMbuilding PyYAML
in the pip logs, but thanks a lot for the suggestion @hundreds-father-404hundreds-father-404
09/10/2021, 3:43 PM.py
files and instructions to build it, often which means compiling C code. https://medium.com/ochrona/understanding-python-package-distribution-types-25d53308a9a
Do you still have your pip log the earlier pip install
? I can help see if you have any sdistsambitious-student-81104
09/10/2021, 3:45 PMpython-distributions
target would also support that.hundreds-father-404
09/10/2021, 3:53 PMI was saying we don't build any sdist in our pants repoGot it. It's fairly common for your third-party requirements to only be published with sdists. Even if your own
python_distribution
target isn't built with sdist
, the third-party requirements you use might be. Sometimes it's from a transitive dependency. It is totally possible all your deps are released as bdist wheels, but also not very common fwict
It looks like this in your pip logs when you need to build an sdist:
Building wheels for collected packages: setproctitle
Building wheel for setproctitle (PEP 517) ... done
Created wheel for setproctitle: filename=setproctitle-1.2.1-cp39-cp39-macosx_11_0_arm64.whl size=10724 sha256=2b8228033e093d0c07e5b3bac321274e11aa51f15a435606fe95671c7fe5964d
Stored in directory: /Users/ericarellano/Library/Caches/pip/wheels/c3/e4/78/85a456b48a3f8ecd33b4cd1b1dfd3ec0ac25ae6d498a86bf65
Successfully built setproctitle
ambitious-student-81104
09/10/2021, 4:00 PMbuilding xxx
?ambitious-student-81104
09/10/2021, 4:01 PMambitious-student-81104
09/10/2021, 4:01 PMhundreds-father-404
09/10/2021, 4:09 PM.whl
file. The difference is whether that .whl
was built already for you vs. if you have to build it locally yourself. So you can skip an entire step of the install stage
To figure out why that dependency doesn't have a prebuilt wheel, you can go to its PyPI page. In my example log, I was installing setproctitle 1.2.1. So first I go to https://pypi.org/project/setproctitle, which I found via PyPI's search bar. Then, I see the version at the top of the page is at 1.2.2 and I want to look at 1.2.1. Click "release history" and choose 1.2.1. Now, click "Download files" tab to get to https://pypi.org/project/setproctitle/1.2.1/#files. There, I can see there are a couple .whl
files and also setproctitle-1.2.1.tar.gz
, which is the sdist. For some dependencies, there won't be any .whl
files. Other times, there will be some but not the ones you need - here, setproctitle
is only releasing .whl
files that work with Linux, and there's no macos
or osx
in the file names, which is why I have to build a wheel on my mac.
For each of those 24 sdists you depend on, your options are:
1. Stop depending on it
2. Do nothing. Some sdists are much slower to build than others
3. See if a newer release of that dependency has .whl
files on its PyPI page. If so, upgrade
4. Pre-build that dependency into .whl
files and host the files internally, such as setting up a server or checking them into Git. You can instruct Pants and pip to install both from PyPI and your prebuilt wheelsambitious-student-81104
09/10/2021, 4:12 PMwitty-crayon-22786
09/10/2021, 4:19 PMwitty-crayon-22786
09/10/2021, 4:20 PM~/.cache/pants/lmdb_store
ambitious-student-81104
09/10/2021, 4:20 PMambitious-student-81104
09/10/2021, 4:21 PMdazzling-diamond-4749
09/10/2021, 4:22 PMwitty-crayon-22786
09/10/2021, 4:23 PMwitty-crayon-22786
09/10/2021, 4:24 PM-ldebug
, which will dump some information each time a process is invokedwitty-crayon-22786
09/10/2021, 4:25 PMspawned local process as Some(47375) for Process
, which contains ~everything that goes into the cache key for the process: if for two different runs you see different processes being used to build from your constraints file, that would be very fishy!dazzling-diamond-4749
09/10/2021, 4:25 PMwitty-crayon-22786
09/10/2021, 4:29 PM