Category : distutils

We have a package that generates code by means of $PYTHON -m grpc_tools.protoc -I="foo_proto" –python-out="$package/out" –grpc_python_out="$package/out" ./path/to/file.proto This was integrated (read hacked) into our setup.py building by means of: from distutils.command.build_py import build_py class BuildPyCommand(build_py): """ Generate GRPC code before building the package. """ def run(self): import subprocess subprocess.call(["./bin/generate_grpc.sh", sys.executable], shell=True) build_py.run(self) setup( …. cmdclass={ ..

Read more

With python eggs, when building c-extensions, the python setup.py build_egg command will automatically create a bootstrap module to import your compiled extension. But wheels do not seem to receive the same services — they don’t auto generate bootstrap modules? Take this example setup.py from setuptools import setup, Extension setup( name= ‘fasthash’, version= ‘0.1.1’, package_dir = ..

Read more

I am studying how does the project scikit-learn setup. The following shows the basic skeleton of the project scikit-learn. I wonder that When someone typed **python setup.py build_ext –i** in the top-level directory, does it trigger the setup.py script to run? scikit-learn |———–Makefile |———–**setup.py** |———–sklearn (package) |————-__init__.py |————-setup.py |————-cluster(package) |—————-__init__.py |—————-setup.py |…….. |————-utils(package) |—————-__init__.py |—————-setup.py ..

Read more