setuptools

Python - Is there any way to get pip without setuptools?

烂漫一生 提交于 2019-12-09 17:29:54
问题 Seems kinda weird that they'd require a package manager to install a package manager. I'm on Windows BTW. 回答1: Pip does require setuptools. Pip is really just a wrapper around setuptools to provide a better installer than easy_install and some nicer installation behaviors, plus uninstall, requirements files, etc. Even if you somehow got pip installed without setuptools it still won't run without it. 回答2: You can use Distribute instead of setuptools : it installs a package called setuptools

How do I forbid easy_install from zipping eggs?

♀尐吖头ヾ 提交于 2019-12-09 15:30:34
问题 What must I put into distutils.cfg to prevent easy_install from ever installing a zipped egg? The compression is a nice thought, but I like to be able to grep through and debug that code. I pulled in some dependencies with python setup.py develop . A closer look reveals that also accepts the --always-unzip flag. It would just be nice to set that as default. 回答1: the option is zip-ok, so put the following in your distutils.cfg: [easy_install] # i don't like having zipped files. zip_ok = 0 回答2:

centos6安装setuptools和pip

寵の児 提交于 2019-12-09 14:21:27
1. 下载setuptools及pip的源码包 setuptools与pip都是python的模块 setuptools源码包: https://pypi.python.org/pypi/setuptools pip源码包: https://pypi.python.org/pypi/pip#downloads 2. 安装setuptools与pip 目前下载的版本是setuptools-12.0.5.tar.gz与pip-6.0.6.tar.gz 用tar命令解压, 格式:tar -xzvf xxxx.tar.gz 先安装setuptools, 进行setuptools的源码根目录下, 执行以下命令进行setuptools模块的安装: [plain] view plaincopy # python setup.py install 安装完setuptools后, 接着安装pip, 进入pip的源码包根目录下, 执行以下命令进行安装: [html] view plaincopy # python setup.py build # python setup.py install 安装完pip后. 看看pip都安装在哪里. 执行以下命令: [plain] view plaincopy # whereis pip 然后再执行 # pip 命令并回车, 如果无法用pip命令,

How to use setuptools to install in a custom directory?

﹥>﹥吖頭↗ 提交于 2019-12-09 09:08:53
问题 I have a Python package that I need to install in the /usr/lib/python2.7/dist-packages or any other specific directory for that matter. Whenever I run the setup.py script it gives the following output: root@abc44:~/som_dir/plugins/abc$python setup.py install running install running bdist_egg running egg_info writing abcNewPlugin.egg-info/PKG-INFO writing top-level names to abcNewPlugin.egg-info/top_level.txt writing dependency_links to abcNewPlugin.egg-info/dependency_links.txt writing entry

Installing a python package/tool by a non root user

一个人想着一个人 提交于 2019-12-09 06:44:55
问题 (1) I have to install one python package (HTSeq) but i dont have root privileges. The package need python 2.4 or latest version. We have python 2.3 on our cluster. Thus I installed python 2.7 on my one local directory using ./configure --prefix=/home/amit/tools/localpython make make install (2) The package also requires numpy : so I also installed it on my local directory using: /home/amit/tools/localpython/bin/python2.7 setup.py install --home=/home/amit/tools/localnumpy and done >>> sys

Providing a custom command class to setup.py in a separately installed package

纵饮孤独 提交于 2019-12-09 04:12:28
I am trying to create a python package that implements a custom command class for setuptools.setup() for use in other, unrelated packages' setup.py scripts. Ideally, I would like to be able to include this package in the setup_requires argument to setup() , and have the custom command class take effect before the remainder of the setup activities are performed. Does setup() provide a hook of some sort to support this use case? If not, how can I minimize the amount of boilerplate that has to appear in the setup.py script when using my package while still guaranteeing that my package will be

How do I subclass the build command?

江枫思渺然 提交于 2019-12-09 03:08:13
问题 The subject is self-descriptive: I need to subclass the setup.py build command in order to perform additional build steps. However I've failed to find any build command class to inherit from. I've been trying: class BuildCommandProxy(setuptools.command.build): pass and class BuildCommandProxy(distutils.command.build): pass and even: class BuildCommandProxy(setuptools.distutils.command.build): pass without any success. UPDATE : looking for how to implement something like this with setuptools .

How to execute a (safe) bash shell command within setup.py?

别来无恙 提交于 2019-12-09 01:21:12
问题 I use nunjucks for templating the frontend in a python project. Nunjucks templates must be precompiled in production. I don't use extensions or asynchronous filters in the nunjucks templates. Rather than use grunt-task to listen for changes to my templates, I prefer to use the nunjucks-precompile command (offered via npm) to sweep the entire templates directory into templates.js. The idea is to have the nunjucks-precompile --include ["\\.tmpl$"] path/to/templates > templates.js command

How does setuptools decide which files to keep for sdist/bdist?

大憨熊 提交于 2019-12-08 21:42:32
问题 I'm working on a Python package that uses namespace_packages and find_packages() like so in setup.py: from setuptools import setup, find_packages setup(name="package", version="1.3.3.7", package=find_packages(), namespace_packages=['package'], ...) It isn't in source control because it is a bundle of upstream components. There is no MANIFEST. When I run python setup.py sdist I get a tarball of most of the files under the package/ directory but any directories that don't contain .py files are

Creating a Python package for a C extension-only module which is pre-built

允我心安 提交于 2019-12-08 15:46:32
问题 I want to create a package for a project that does not contain any .py source files, but is completely implemented as a Python C extension (resulting in an .so ). Additionally, assume that the .so is already built by a separate build process (say CMake). I know that setuptools/distutils minimally requires a directory structure: mymodule __init__.py But what I really want is for mymodule to be provided by a C extension (say mymodule.so ) such that after installing the package, import mymodule