setuptools

setup.py ignores full path dependencies, instead looks for “best match” in pypi

妖精的绣舞 提交于 2020-01-03 15:22:09
问题 Similar to https://stackoverflow.com/questions/12518499/pip-ignores-dependency-links-in-setup-py I'm modifying faker in anticipation to an open PR I have open with validators, and I want to be able to test the new dependency i will have. setup( name='Faker', ... install_requires=[ "python-dateutil>=2.4", "six>=1.10", "text-unidecode==1.2", ], tests_require=[ "validators@https://github.com/kingbuzzman/validators/archive/0.13.0.tar.gz#egg=validators-0.13.0", # TODO: this will change # noqa

Get entry point script file location in setuputils package?

一笑奈何 提交于 2020-01-03 08:15:30
问题 So I have an entry point defined in my setup.py [console_scripts] section. The command is properly installed and works fine, but I need a way to programatically find out the path to the script (e.g. on windows it'll be something like C:/my/virtual/env/scripts/my_console_script.exe). I need this so I can pass that script path as an argument to other commands, regardless of where the package is installed. Setuputils provides the pkg_resources , but that doesn't seem to expose any way of

Python package with data files

久未见 提交于 2020-01-02 23:03:52
问题 A Python package should contain some data files alongside with Python sources. How to make setuptools or distutils to install the data files? How can my Python code know which directories my data files are installed in? 回答1: Following will answer your Q#1: There is a concept of data_file and package_data. Package_data is used to include documentation and data_files is used to include configuration file, messages and data file. 来源: https://stackoverflow.com/questions/48696115/python-package

How do you specify the shebang line of a command script created by setuptools

孤人 提交于 2020-01-02 05:14:08
问题 I have created a package that I will be distributing throughout the company that replaces a legacy bash script with the same name. It is referenced many places so it needs to execute like the current script does. This has worked fine until I encountered some servers that do not have a current version of Python as the default Python (aka CentOS). Is there a way to specify in the setup.py what shebang line is created at the top of the script file? i.e. I need #!/opt/bin/python rather than #!

Directly call distutils' or setuptools' setup() function with command name/options, without parsing the command line?

倖福魔咒の 提交于 2020-01-02 02:52:09
问题 I'd like to call Python's distutils' or setuptools' setup() function in a slightly unconventional way, but I'm not sure whether distutils is meant for this kind of usage. As an example, let's say I currently have a 'setup.py' file, which looks like this (lifted verbatim from the distutils docs--the setuptools usage is almost identical): from distutils.core import setup setup(name='Distutils', version='1.0', description='Python Distribution Utilities', author='Greg Ward', author_email='gward

Why does 'pip' require “setuptools >= 0.8” even though I have 2.1 installed?

痴心易碎 提交于 2020-01-01 16:51:07
问题 When I attempt certain commands with pip , I get an error message stating that pip “requires setuptools >= 0.8 for dist-info” even though I have, according to yolk -l (as well as pip list ), a much higher version of setuptools installed: pip - 1.5 - active ... setuptools - 2.1 - active Why is pip asking for a version of setuptools >= 0.8? Isn't 2.1 > 0.8; or is my installation not in fact at the version that yolk is reporting? Is there something I need to do to ensure that I in fact do have

Installing my sdist from PyPI puts the files in unexpected places

[亡魂溺海] 提交于 2020-01-01 09:29:09
问题 My problem is that when I upload my Python package to PyPI, and then install it from there using pip, my app breaks because it installs my files into completely different locations than when I simply install the exact same package from a local sdist. Installing from the local sdist puts files on my system like this: /Python27/ Lib/ site-packages/ gloopy-0.1.alpha-py2.7.egg/ (egg and install info files) data/ (images and shader source) doc/ (html) examples/ (.py scripts that use the library)

doesn't setup.py develop use wheel for install_requires?

☆樱花仙子☆ 提交于 2020-01-01 09:15:22
问题 I have the impression that (using setuptools): python setup.py develop Won't use wheels when installing required packages (specified in install_requires). Questions: is my impression correct? is there a way to force it to use wheel? I am talking about this particular setup script. 回答1: For whatever reason, setuptools simply wont use wheels. The likely explanation is that setuptools is older than wheels, and no one has updated it to use them. Using pip install . works however, since pip is

doesn't setup.py develop use wheel for install_requires?

空扰寡人 提交于 2020-01-01 09:15:03
问题 I have the impression that (using setuptools): python setup.py develop Won't use wheels when installing required packages (specified in install_requires). Questions: is my impression correct? is there a way to force it to use wheel? I am talking about this particular setup script. 回答1: For whatever reason, setuptools simply wont use wheels. The likely explanation is that setuptools is older than wheels, and no one has updated it to use them. Using pip install . works however, since pip is

unattended install of binary python packages (modules) for windows

陌路散爱 提交于 2019-12-31 21:42:52
问题 Is there no sane way to peform a scripted install of binary python packages for windows? Unfortunately it seems like several essential windows python packages like pywin32 and py2exe are only available as EXE's not MSI's (and as far as I know only the latter are scriptable). Easy_install/pip also seems no use since they apparently only find source packages and then try to compile locally which is obviously unsatisfactory. Am I missing something? 回答1: You can download the source code of