I’m not sure if this is the right place to post this - presumably not in the Packaging category here since that’s more for development of tools/standards. I could create an issue on the GitHub - pypa/build: A simple, correct PEP 517 build frontend repo.
Anyway, I am trying to package a small project using PEP517. pypa/build seems to be a recommended way (the recommended way?) to do this, but I’ve run into a very confusing problem. Running python -m build
completes the sdist build successfully, but during wheel building fails with:
* Building wheel from sdist
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools>=42, setuptools_scm[toml]>=3.4, wheel<0.37)
* Getting dependencies for wheel...
running egg_info
listing git files failed - pretending there aren't any
writing manifest file 'versioned_pickle.egg-info\SOURCES.txt'
* Installing packages in isolated environment... (wheel)
C:\Users\asafs\AppData\Local\Temp\build-env-w6nk4k0f\Scripts\python.exe: Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')
Same thing happens if I pass “-w” to build the wheel from source. However, with “–no-isolation” everything works, so it is indeed the step of installing wheel into the isolated env that’s failing. (FWIW, pep517.build
also works but I don’t want to rely on deprecated functionality,)
I am on windows, and my python interpreter itself was installed with miniconda. I’ve tried Python 3.9 & 3.8, and build 0.7.0 or 0.6.0.post1.
Anyone ever seen this type of thing before? Googling didn’t reveal anything useful.