setuptools

python pip安装扩展报错

孤者浪人 提交于 2019-11-28 22:28:06
1.安装tldr报错 (1)报错详情: [root@linuxnode1 ~]# pip install tldr Collecting tldr Downloading https://files.pythonhosted.org/packages/ff/bb/0870bf90ad1137172b3cc0758d18e99fd2325243139e0bb7652556c77e0e/tldr-0.5.tar.gz Complete output from command python setup.py egg_info: /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_markdown_filename' warnings.warn(msg) Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-ZBdOo2/tldr/setup.py", line 39, in <module> "Topic :: System" File "/usr/lib64/python2.7/distutils

Why does “python setup.py sdist” create unwanted “PROJECT-egg.info” in project root directory?

僤鯓⒐⒋嵵緔 提交于 2019-11-28 22:19:22
When I run python setup.py sdist it creates an sdist in my ./dist directory. This includes a "PROJECT-egg.info" file in the zip inside my "dist" folder, which I don't use, but it doesn't hurt me, so I just ignore it. My question is why does it also create a "PROJECT-egg.info" folder in my project root directory? Can I make it stop creating this? If not, can I just delete it immediately after creating the sdist? I'm using the 'setup' function imported from setuptools. WindowsXP, Python2.7, Setuptools 0.6c11, Distribute 0.6.14. My setup config looks like: {'author': 'Jonathan Hartley', 'author

Distribute a Python package with a compiled dynamic shared library

送分小仙女□ 提交于 2019-11-28 21:31:42
How do I package a Python module together with a precompiled .so library? Specifically, how do I write setup.py so that when I do this in Python >>> import top_secret_wrapper It can easily find top_secret.so without having to set LD_LIBRARY_PATH ? In my module development environment, I have the following file structure: . ├── top_secret_wrapper │ ├── top_secret.so │ └── __init__.py └── setup.py Inside __init__.py , I have something like: import top_secret Here's my setup.py from setuptools import setup, Extension setup( name = 'top_secret_wrapper', version = '0.1', description = 'A Python

How to specify version ranges in install_requires (setuptools, distribute)

旧街凉风 提交于 2019-11-28 21:03:28
I want to make a package to depend the particular version range e.g. >= 0.5.0, < 0.7.0 . Is it possible in install_requires option, and if so how should it be? Ricardo Altamirano According to the documentation , your syntax should work correctly. The documentation states that: setuptools and pkg_resources use a common syntax for specifying a project's required dependencies. This syntax consists of a project's PyPI name, optionally followed by a comma-separated list of "extras" in square brackets, optionally followed by a comma-separated list of version specifiers. A version specifier is one of

Packaging resources with setuptools/distribute

倾然丶 夕夏残阳落幕 提交于 2019-11-28 20:50:00
I'm developing an Python egg that has several .txt dependencies (they're templates used to generate files by the egg itself), and I'm struggling to get those dependencies copied to site-packages during setup.py install . According to the distribute documentation ... Filesystem of my package: setup.py package |--- __init__.py |--- main.py |--- binary (calls main.py with pkg_resources.load_entry_point) |--- templates |--file1.txt |--file2.txt In setup.py: setup( [...] eager_resources = ['templates/file1.txt', 'templates/file2.txt'] ) Within my package: from pkg_resources import resource_string

stopping setup.py from installing as egg

柔情痞子 提交于 2019-11-28 20:45:55
问题 How do I stop setup.py from installing a package as an egg? Or even better, how do I easy_install from installing a package as an egg ? sudo python setup.py install The reason being that PyDev is rather picky about packages in egg format... The package I am interested in at the moment is boto . Update: I found the brute force way of doing it: sudo easy_install -m boto cd path/to/boto-xyz.egg sudo mv boto .. sudo rm -rf boto-xyz.egg 回答1: I feel like I'm missing something subtle or important

Can a Python package depend on a specific version control revision of another Python package?

本小妞迷上赌 提交于 2019-11-28 18:57:37
Some useful Python packages are broken on pypi, and the only acceptable version is a particular revision in a revision control system. Can that be expressed in setup.py e.g requires = 'svn://example.org/useful.package/trunk@1234' ? You need to do two things. First, require the exact version you want, e.g.: install_requires = "useful.package==1.9dev-r1234" and then include a dependency_links setting specifying where to find it: dependency_links = ["svn://example.org/useful.package/trunk@1234#egg=useful.package-1.9dev-r1234"] Note that the version #egg= part of the dependency_links URL must

Python setuptools: How can I list a private repository under install_requires?

廉价感情. 提交于 2019-11-28 18:06:04
I am creating a setup.py file for a project which depends on private GitHub repositories. The relevant parts of the file look like this: from setuptools import setup setup(name='my_project', ..., install_requires=[ 'public_package', 'other_public_package', 'private_repo_1', 'private_repo_2', ], dependency_links=[ 'https://github.com/my_account/private_repo_1/master/tarball/', 'https://github.com/my_account/private_repo_2/master/tarball/', ], ..., ) I am using setuptools instead of distutils because the latter does not support the install_requires and dependency_links arguments per this answer.

How to solve pkg_resources.VersionConflict error during bin/python bootstrap.py -d

好久不见. 提交于 2019-11-28 17:28:00
问题 I am tring to create a new plone environment using python plone-devstart.py tool. I got a bootstrap error. So i used a command bin/python bootstrap.py -d from my project directory. It(bin/python bootstrap.py -d command) worked fine before But now i got an error like oomsys@oomsysmob-6:~/demobrun$ bin/python bootstrap.py -d Downloading http://pypi.python.org/packages/source/d/distribute/distribute- 0.6.49.tar.gz Extracting in /tmp/tmpDqVwYA Now working in /tmp/tmpDqVwYA/distribute-0.6.49

How do I write a setup.py for a twistd/twisted plugin that works with setuptools, distribute, etc?

人盡茶涼 提交于 2019-11-28 16:29:13
问题 The Twisted Plugin System is the preferred way to write extensible twisted applications. However, due to the way the plugin system is structured (plugins go into a twisted/plugins directory which should not be a Python package), writing a proper setup.py for installing those plugins appears to be non-trivial. I've seen some attempts that add 'twisted.plugins' to the 'packages' key of the distutils setup command, but since it is not really a package, bad things happen (for example, an __init__