ionelmc / python-lazy-object-proxy

A fast and thorough lazy object proxy.
BSD 2-Clause "Simplified" License
247 stars 36 forks source link

Provide none-any version without C extension #74

Closed vit9696 closed 10 months ago

vit9696 commented 1 year ago

Statically-compiled python interpreter cannot load C extensions as they are dynamic libraries. Could you please provide a version without the C extension on pypi and/or at least an easy way to build it without patches?

ionelmc commented 1 year ago

Try the SETUPPY_ALLOW_PURE env var.

vit9696 commented 1 year ago

Thanks, will try. The second issue is that running setup.py requires setuptools_scm, which is optional when installing from a whl package.

vit9696 commented 1 year ago

Tested. This partially works, on systems with non-statically linked python it still builds a dynamic library, which is undesired for unified testing.

ionelmc commented 1 year ago

I can add a skip flag but I'd like to understand a bit ... in your statically-compiled python project how are you installing all the other dependencies? I'd expect you'd use other packages not just lazy-object-proxy....

vit9696 commented 1 year ago

In a build script we download every package recursively from pypi and install via the following command:

/path/to/python3 -m pip install --no-build-isolation --no-index /path/to/setuptools_scm-7.1.0-py3-none-any.whl

TLS/full networking support is not included, so downloading from pypi within the python is not an option.

lazy-object-proxy is indeed one of the dependencies we had to install from some other package. I am not exactly sure which at the moment.

ionelmc commented 10 months ago

Sorry, the env var is SETUPPY_FORCE_PURE.