setuptools

Python: How to connect to a protected svn repository with setuptools

我们两清 提交于 2019-12-12 11:31:24
问题 I am trying to configure a setuptools.setup script. PyPI packages works fine but I don't manage to install the 'mypackage' module from my svn repository. I get the error: Couldn't find index page for 'myotherpackage' (maybe misspelled?) Did I forget something important concerning the dependency_links parameter? Are the provided parameters (see below) ok? setup.py #!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages version = '2.5' setup(name=

What is the purpose of setuptools requirements of the form “package===version”

╄→尐↘猪︶ㄣ 提交于 2019-12-12 10:58:38
问题 Say I have a package with a console script such as from setuptools import setup setup( name='eg_package', version='0.0.1', description='Trivial test package', packages=[ 'eg_package', ], entry_points={ 'console_scripts': [ 'foo = eg_package.main:main', ] }, ) If I set and explicit build tag using egg_info -b mytag the resulting script has __requires__ = 'eg-package===0.0.1mytag' , i.e. with 3 "=" signs. This occurs when the tag is not something conventional like b1 for a beta release. At

Can't install Pillow on centos

强颜欢笑 提交于 2019-12-12 10:38:31
问题 I have cenots 6.3 and python 2.6 on it when I try to install it via easyinstall I get following error: _imaging.c:76:20: error: Python.h: No such file or directory In file included from /tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/Imaging.h:14, from _imaging.c:82: /tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/ImPlatform.h:14:2: error: #error Sorry, this library requires support for ANSI prototypes. /tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/ImPlatform.h:17:2: error: #error Sorry,

How to download cross-platform wheels via pip?

给你一囗甜甜゛ 提交于 2019-12-12 07:50:02
问题 I'm accustomed to pre-downloading packages using Pip, then copying them over to a target machine for deployment. With the newly introduced Python Wheels, I'm forced to "pip ... --no-use-wheel", as some of the downloaded packages are platform specific (I'm developing on OSX and deploying to Debian) and will not install on the target machine. Is there a way to download Wheels for target platforms (or platform independent)? 回答1: The pip download command now has the --platform argument, which you

Installing matplotlib through setuptools install_requires

六眼飞鱼酱① 提交于 2019-12-12 06:17:32
问题 I have been trying to install matplotlib through install_requires and it has been failing with error: unexpected html page found... When I just try to install it regularly through pip it seems to work fine. Does anyone know how to fix this kind of issue with install_requires. I would like setup.py to handle these issues. I had a similar problem with numpy failing with Python.h problems, but then a regular pip install fixed that as well. 来源: https://stackoverflow.com/questions/28566843

Folderless namespaced packages with setuptools

心不动则不痛 提交于 2019-12-12 05:16:34
问题 I have once seen a Python package with one flat src/ folder containing setup.py , but which still declare itself as namespace or namespace.foo package and you can import files from the package as from namespace.foo import x . This was done with some setup.py option and tricks. However, I have unable to find the source or the package how this was done and I am now looking for examples for it. 来源: https://stackoverflow.com/questions/9587667/folderless-namespaced-packages-with-setuptools

How to import a PIP package through Jython?

风格不统一 提交于 2019-12-12 02:13:23
问题 In reference to hooking into PIP from Jython, It looks like, possibly, PIP is included with Jython: How can I install various Python libraries in Jython? Jython easy_install error How can I use jython setup.py install? How, specifically, from Jython itself, is PIP invoked? Both to install a package and, more importantly, to import that package for reference? I've seen no specific code examples written in Jython. 回答1: Once Jython 2.7 is installed to ~/ then: thufir@doge:~$ thufir@doge:~$

Create editable package setup.py in the same root folder as __init__.py

☆樱花仙子☆ 提交于 2019-12-11 17:18:57
问题 An existing project is setup in a way that the repository has an __init__.py in at the root folder. I would like to create a setup.py in the repository so this would be the resulting project structure: project-master/ ├── __init__.py ├── setup.py └── submodule1 ├── code.py └── __init__.py └── submodule2 ├── code.py └── __init__.py and you should be able to: git clone project.url cd project-master pip install -e . from project.submodule1 import ... I tried the hacky solution of temporarily

Change output directory in setup.py

≡放荡痞女 提交于 2019-12-11 17:06:47
问题 I'm using setup from setuptools to create a setup.py , and I was wondering if it's possible to change the output directory programmatically to change it from dist/ . I'm aware that you can do this from the command line using the --dist-dir flag, but I want to be able to do from within the setup.py file instead. Anyone have any ideas? 回答1: You need to override code that set the default name: from distutils.command.bdist import bdist as _bdist from distutils.command.sdist import sdist as _sdist

Specify setup time dependency with `--global-option` for a python package

落花浮王杯 提交于 2019-12-11 15:34:33
问题 I'm trying to package a python library that has setup-time (and also run-time) dependencies: it import s the modules so that the modules can inform the setup process of the location of some provided C headers: from distutils.extension import Extension from pybedtools.helpers import get_includes as pybedtools_get_includes from pysam import get_include as pysam_get_include # [...] extensions = [ Extension( "bam25prime.libcollapsesam", ["bam25prime/libcollapsesam.pyx"], include_dirs=pysam_get