setup.py

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

我的梦境 提交于 2019-12-01 16:19:25
问题 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! 回答1: Take a

How can I use jython setup.py install?

与世无争的帅哥 提交于 2019-12-01 12:40:32
I am using a Jython virtualenv where I can install whatever software via pip or via easy_install, but there is a software that is not registered yet and the installation mode via: [sudo] python setup.py install and I am trying to do the same with jython: [sudo] jython setup.py install So, I am getting these follow errors: Traceback (most recent call last): File "setup.py", line 3, in <module> from setuptools import setup, find_packages ImportError: No module named setuptools I checked and installed jython ez_setup.py again. I downloaded the yolk and didn't solved too. My folder: ╭─hudson

Python setup.py call makefile don't include binaries

。_饼干妹妹 提交于 2019-12-01 05:57:24
Some context: I have some C code that when compiled I can call in the terminal like this: ./my_excec -params It generates some files that I am using in python to generate charts, and other stuff. I want to pack everything in a python library both the C code and the python code. The C code is not a python extension (prolly going to be in a future but right now is not). I have a make file to compile the C code and I know I can call it from the setup.py like this: subprocess.call(['make', '-C', 'word2vec-src']) What I want to be able to do is: pip install my_module That should call the makefile,

How should I handle importing third-party libraries within my setup.py script?

痴心易碎 提交于 2019-12-01 04:51:47
I'm developing a Python application and in the process of branching off a release. I've got a PyPI server set up on a company server and I've copied a source distribution of my package onto it. I checked that the package was being hosted on the server and then tried installing it on my local development machine. I ended up with this output: $ pip3 install --trusted-host 172.16.1.92 -i http://172.16.1.92:5001/simple/ <my-package> Collecting <my-package> Downloading http://172.16.1.92:5001/packages/<my-package>-0.2.0.zip Complete output from command python setup.py egg_info: Traceback (most

How to create a Pure-Python wheel

筅森魡賤 提交于 2019-12-01 04:10:23
From the following setup.py file, I am trying to create a pure-python wheel from a project that should contain only python 2.7 code. from setuptools import setup setup( name='foo', version='0.0.1', description='', url='', install_requires=[ 'bpython', 'Django==1.8.2', ], ) However, when I run python setup.py bdist_wheel the wheel file that is generated is platform specific foo-0.0.1-cp27-none-macosx_10_9_x86_64.whl wheel file instead of the expected foo-0.0.1-cp27-none-any.whl . When I try to install this wheel on a different platform it fails saying it is not compatible with this Python . I

How to include and install local dependencies in setup.py in Python?

一世执手 提交于 2019-12-01 04:10:02
I am creating a setup.py to distribute my application. This application has a number of dependencies which can be installed via pip, it also has some custom dependencies which can not be installed from PyPI. So, I have created a custom_package_0.1.whl which will be included into the distribution and must be installed as a dependency after setup.py installs everything from install_requires . Imagine the following app structure: my_app/ win_deps/custom_package_0.1.whl my_app/ __init__.py main.py setup.py setup.cfg How do I do that? There are several options that you can choose from: Upload your

Python setup.py call makefile don't include binaries

为君一笑 提交于 2019-12-01 03:52:45
问题 Some context: I have some C code that when compiled I can call in the terminal like this: ./my_excec -params It generates some files that I am using in python to generate charts, and other stuff. I want to pack everything in a python library both the C code and the python code. The C code is not a python extension (prolly going to be in a future but right now is not). I have a make file to compile the C code and I know I can call it from the setup.py like this: subprocess.call(['make', '-C',

How should I handle importing third-party libraries within my setup.py script?

☆樱花仙子☆ 提交于 2019-12-01 01:44:19
问题 I'm developing a Python application and in the process of branching off a release. I've got a PyPI server set up on a company server and I've copied a source distribution of my package onto it. I checked that the package was being hosted on the server and then tried installing it on my local development machine. I ended up with this output: $ pip3 install --trusted-host 172.16.1.92 -i http://172.16.1.92:5001/simple/ <my-package> Collecting <my-package> Downloading http://172.16.1.92:5001

What is the graft command in Python's MANIFEST.in file?

夙愿已清 提交于 2019-11-30 17:23:26
I found a Python project with a MANIFEST.in file. I can guess at the meaning of much of it, but I am unclear on the meaning of the line: graft tools You can see such a file in JoshData/pdfminer/MANIFEST.in or openstack/deb-python-falcon/MANIFEST.in for instance. It is a python project which uses the MANIFEST.in template A MANIFEST.in file can be added in a project to define the list of files to include in the distribution built by the sdist command. When sdist is run, it will look for the MANIFEST.in file and interpret it to generate the MANIFEST file that contains the list of files that will

Is it possible to include subdirectories using dist utils (setup.py) as part of package data?

孤街浪徒 提交于 2019-11-30 17:13:40
Basically my python package is setup like: module \_examples \_folder1 \_file1.py \_file2.py \_folder2 \_file1.py \_file2.py Basically I want to just use: package_data = { 'module': ['examples/*'], }, because my project always has people adding examples and I want it to be easy to list them from within my application. I can get it work for any FILE within examples, but not re-curse down through sub-directories. Is this possible? defermat I believe what you're looking for is something like this for you setup.py , which will recursively find any packages in the project, also be sure and include