setup.py

How can you bundle all your python code into a single zip file?

女生的网名这么多〃 提交于 2019-12-03 04:16:09
问题 It would be convenient when distributing applications to combine all of the eggs into a single zip file so that all you need to distribute is a single zip file and an executable (some custom binary that simply starts, loads the zip file's main function and kicks python off or similar). I've seen some talk of doing this online, but no examples of how to actually do it. I'm aware that you can (if its zip safe) convert eggs into zip files. What I'm not sure about is: Can you somehow combine all

how to set bug tracker url in setup.py script

柔情痞子 提交于 2019-12-03 01:22:39
I have just discovered the pypi web UI have a field 'Bug tracker URL' in edit of egg metadata. This field exists so I guess it is supported in setup.py but I can't find anything about this using google. So the question how do I set up this field in my setup.py so when doing a dist release on pypi it can be automaticly filled. The entry is called bugtrack_url , but it's not being picked up from setup.py . From context and code I understand it was intended to be used through-the-web on PyPI only, as per-project metadata, and not the usual per-release information. The field is now considered a

Cygwin - How to install ansible?

杀马特。学长 韩版系。学妹 提交于 2019-12-02 23:59:19
How to get / install ansible using Cygwin? I tried the following steps but it's didn't work during bullet 5 (while running " python setup.py install "). Steps taken from: Taken from https://servercheck.in/blog/running-ansible-within-windows 1) Download and install Cygwin, with at least the following packages selected (you can select the packages during the install process): libyaml libyaml-devel curl python (2.7.x) python-crypto python-openssl python-paramiko python-setuptools git (2.1.x) vim openssh openssl openssl-devel 2) Download and install PyYAML and Jinja2, as they're not available via

Using CMake with setup.py

不羁岁月 提交于 2019-12-02 18:19:42
For a project I build a C library and implict Python bindings (via GObject introspection) with CMake. I also want to distribute some Python helper modules using distutils. I am able to build and install the module with this CMakeLists.txt find_program(PYTHON "python") if (PYTHON) set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in") set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py") set(DEPS "${CMAKE_CURRENT_SOURCE_DIR}/module/__init__.py") set(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build") configure_file(${SETUP_PY_IN} ${SETUP_PY}) add_custom_command(OUTPUT ${OUTPUT} COMMAND ${PYTHON}

How can you bundle all your python code into a single zip file?

喜欢而已 提交于 2019-12-02 17:34:49
It would be convenient when distributing applications to combine all of the eggs into a single zip file so that all you need to distribute is a single zip file and an executable (some custom binary that simply starts, loads the zip file's main function and kicks python off or similar). I've seen some talk of doing this online, but no examples of how to actually do it. I'm aware that you can (if its zip safe) convert eggs into zip files. What I'm not sure about is: Can you somehow combine all your eggs into a single zip file? If so, how? How would you load and run code from a specific egg? How

Passing arguments in python setup.py install_requires list

白昼怎懂夜的黑 提交于 2019-12-01 19:19:57
I have used pip to install PIL. It requires two additional arguments while installation. So the command for installation looks something like this. pip install PIL --allow-external PIL --allow-unverified PIL I need to add the PIL package in setup.py file. Adding PIL in the install_requires list do install PIL but it doesn't work, as I need to install PIL with the additional arguments. So how can I add the PIL to the install_requires list with additional arguments ? Currently, there is no way to specify extra arguments in install_requires in setup.py. But, I solved my problem of installing

Python building cython extension with setup creates subfolder when __init__.py exists

拟墨画扇 提交于 2019-12-01 18:37:23
问题 I am trying to compile a simple cython module using the following setup.py : from distutils.core import setup from Cython.Build import cythonize setup( ext_modules=cythonize("verifier_c.pyx"), ) I have the following folder structure: . c_ext/ __init__.py verifier_c.pyx setup.py If I run the following: python setup.py build_ext --inplace I get an extra c_ext subfolder like this: . c_ext/ build/ ... c_ext/ verifier_c.so __init__.py verifier_c.pyx setup.py But if I remove the __init__.py file, I

Passing arguments in python setup.py install_requires list

為{幸葍}努か 提交于 2019-12-01 18:11:24
问题 I have used pip to install PIL. It requires two additional arguments while installation. So the command for installation looks something like this. pip install PIL --allow-external PIL --allow-unverified PIL I need to add the PIL package in setup.py file. Adding PIL in the install_requires list do install PIL but it doesn't work, as I need to install PIL with the additional arguments. So how can I add the PIL to the install_requires list with additional arguments ? 回答1: Currently, there is no

Python building cython extension with setup creates subfolder when __init__.py exists

a 夏天 提交于 2019-12-01 17:57:10
I am trying to compile a simple cython module using the following setup.py : from distutils.core import setup from Cython.Build import cythonize setup( ext_modules=cythonize("verifier_c.pyx"), ) I have the following folder structure: . c_ext/ __init__.py verifier_c.pyx setup.py If I run the following: python setup.py build_ext --inplace I get an extra c_ext subfolder like this: . c_ext/ build/ ... c_ext/ verifier_c.so __init__.py verifier_c.pyx setup.py But if I remove the __init__.py file, I get the verifier_c.so file in the same folder as verifier_c.pyx . I did not find where this behavior

How to add header files in setup.py so dependencies are observed when building the extensions?

允我心安 提交于 2019-12-01 17:34:35
The question seems long, but it all comes down to how I can add header files to specific extension specification. The motivation is that if I change one of the header files, issuing python setup.py build should rebuild the extension even when none of the .c files are changed. I've tried to add the depending header files in "sources" keyword arg in the Extension constructor, but running the resulting setup.py generated errors complaining about unknown file extension ".h". Thanks! Take a look at the depends option on the Extension class. I've not used it myself, but your exact example is listed