setuptools

How to use `pip` and setup.py to automatically install dependencies that may be private repositories hosted on github

拈花ヽ惹草 提交于 2019-12-11 02:27:04
问题 I don't think this is a dupicate, because I tried all links I could find for the past 2 hours and none of the solutions worked. I want the user to be able to clone a repository, cd into the directory, and run $ pip install . (or at least pip install --process-dependency-links . ) to install the package, its pypi dependencies AND its (latest) private github dependencies assuming the user has read permissions for them. (also the devs should be able to run $ pip install -e . ) my setup.py :

python setuptools and easy_install numpy question

泄露秘密 提交于 2019-12-11 01:54:43
问题 So I'm having a bit of a dillema here. Doesn't setuptools use easy_install to get the additional dependencies you specify in a setup.py ? I'm asking because say I have a setup.yp and in the install_requires = ["numpy"]. Now if I run python setup.py install that gives a error: _configtest.c:1:20: error: Python.h: No such file or directory _configtest.c:1:20: error: Python.h: No such file or directory lipo: can't figure out the architecture type of: /var/tmp//cciDxELX.out _configtest.c:1:20:

Getting setuptools to ignore PyPI repository

孤人 提交于 2019-12-11 01:48:41
问题 I have in my packages setup.py : from setuptools import setup setup( dependency_links=['http://local.mirror'], install_requires=[ 'many', 'different', 'packages', ], ... ) What seems to happen is that setuptools will load entries from install_requires in reverse order, and it will respect the dependency_links entry for only the last entry in install_requires (it installs things in reverse order). There's plenty of discussion about how to add packages that aren't in PyPI, but I can't seem to

Attempting to build a cython extension to a python package, not creating shared object (.so) file

谁说胖子不能爱 提交于 2019-12-11 01:29:33
问题 I have attempted to use the answer here to add the building of a cython extension into my package. It currently cythonizes the code to produce a .c file from the .pyx file but doesn't create a shared object .so file, as such when I try to import the package, and one of the modules attempts to import the shared object file it cannot find it. My setup.py file (this is slightly cut-down) is like so: from setuptools import setup from setuptools.extension import Extension import os import numpy

Installed module is empty

此生再无相见时 提交于 2019-12-10 21:21:42
问题 I'm tring to use setuptools for python3 code. My project structure: ./testSetup/ ./testSetup/testSetup ./testSetup/testSetup/foo.py ./testSetup/Setup.py ./testSetup/testSetup/foo.py content: def say_foo(): print('foo') ./testSetup/Setup.py content: from setuptools import setup, find_packages import testSetup setup( name='testSetup', version='0.0.1', packages=find_packages(), author='Bastien Sevajol', author_email="testSetup@bux.fr", description='test', long_description='test test', include

pkg_resources.resource_filename is not extracting files

点点圈 提交于 2019-12-10 19:32:17
问题 I want to package a project that contains (and uses) template html files and distribuite it as an egg. Since I’m using tornadoweb, which requires file paths to point to html files, I can’t access the resources via stream and I really need the html files to be extracted when my program is running. I’m having a look at setuptools and according to resource_filename docs (bold is mine): Sometimes, it is not sufficient to access a resource in string or stream form, and a true filesystem filename

Conda Build - creating a Conda package fails on dependencies for platform win-64

依然范特西╮ 提交于 2019-12-10 19:31:04
问题 Building my first conda package from a local dir. following instructions from CONDA site. https://conda.io/docs/user-guide/tasks/build-packages/recipe.html i get the following error conda_build.exception.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform win-64: set([u'pywinauto', u'statistics', u'openturns']) I tried several items, however it seems the pywinauto, statistics and openturns are causing dependency issues. here is my meta.yml file package: name: apples version:

What is the best way to handle dependencies based on the Python version?

廉价感情. 提交于 2019-12-10 19:11:52
问题 If I have a setup.py using SetupTools, is there a way to specify install_requires for a specific version of Python? E.g., if one of my modules requires the use of an OrderedDict, I would like versions of Python <2.7 to install the ordereddict1.1 package from PyPI, but there's no reason to (and probably a bad idea) to add that to a Python 2.7 installtion. What's the best way to handle this? Separate eggs for the different versions? I know that's necessary for non-pure modules but this would be

entry_points does not create custom scripts with pip or easy_install in Python?

心已入冬 提交于 2019-12-10 19:10:54
问题 I am using simple entry points to make a custom script, with this in setup.py : entry_points = { 'my_scripts': ['combine_stuff = mypackage.mymod.test:foo'] } where mypackage/mymod/test.py contains: import argh from argh import arg @arg("myarg", help="Test arg.") def foo(myarg): print "Got: ", myarg When I install my package using this (in same directory as setup.py ) pip install --user -e . The entry points do not get processed at all it seems. Why is that? If I install with distribute easy

Add Python arguments in script's shebang line (script made with buildout and zc.recipe.egg:scripts)

不羁的心 提交于 2019-12-10 17:49:50
问题 How to specify arguments for Python when building script with buildout? Here's my buildout.cfg: [buildout] parts = python develop = . [python] recipe = zc.recipe.egg:scripts eggs = myproject And setup.py: from setuptools import setup, find_packages setup( name = 'myproject', packages = find_packages(), entry_points = """ [console_scripts] myscript = myproject:main """, ) I get the following shebang with this configuration: $ pip install . $ head -n1 /usr/local/bin/myscript #!/usr/bin/python