setup.py

Python: migrate setup.py “scripts=” to entry_points

痞子三分冷 提交于 2020-01-12 14:06:12
问题 I'd like to make use of someone else's python utility, foobartools , whose native environment is linux. Foobartools is pure python so there's no reason it can't be used on Windows, where I am. In their setup.py they're using the older style scripts=['bin/foobar'], . Running pip install -e b:\code\foobar creates a file called foobar in %pythonhome%\Scripts , but Windows doesn't know about it even though Scripts is in PATH. To use it I need to make a @python %pythonhome%\scripts\foobar batch

need to package jinja2 template for python

谁说我不能喝 提交于 2020-01-11 10:31:36
问题 (UPDATE: I've made a better question with a better answer here. I was going to delete this question, but some of the answers might prove useful to future searchers.) My question is just about identical to this, but that answer is ugly (requires a dir structure including sharedtemplates/templates/templates/ ), incomplete as posted (user "answered" his own question), and assumes some knowledge I don't have. I'm working on my first python-backed web application. The javascript component is well

How to include and install local dependencies in setup.py in Python?

自闭症网瘾萝莉.ら 提交于 2020-01-10 03:38:06
问题 I am creating a setup.py to distribute my application. This application has a number of dependencies which can be installed via pip, it also has some custom dependencies which can not be installed from PyPI. So, I have created a custom_package_0.1.whl which will be included into the distribution and must be installed as a dependency after setup.py installs everything from install_requires . Imagine the following app structure: my_app/ win_deps/custom_package_0.1.whl my_app/ __init__.py main

Cython setup.py for several .pyx

别来无恙 提交于 2020-01-09 19:44:40
问题 I would like to cythonize faster. Code for one .pyx is from distutils.core import setup from Cython.Build import cythonize setup( ext_modules = cythonize("MyFile.pyx") ) What if i want to cythonize several files with ext .pyx, that i will call by their name all .pyx files in a folder What would be python code for the setup.py in both cases ? 回答1: From: https://github.com/cython/cython/wiki/enhancements-distutils_preprocessing # several files with ext .pyx, that i will call by their name from

Inconsistent behaviour of bdist vs sdist when distributing a Python package

一笑奈何 提交于 2020-01-06 20:02:02
问题 I have a big project with the following structure. utilities is a collections of small modules that are reused in various places by the different components of the big_project , project1 , 2, etc. big_project/ |-- __init__.py |-- utilities/ |-- mod1.py |-- mod2.py |-- project1/ |-- setup.py |-- __init__.py |-- src/ |-- __init__.py |-- mod1.py |-- mod2.py |-- examples/ |-- __init__.py |-- mod.py |-- project2/ |-- ... |-- project3/ |-- ... I want to distribute project1 , including utilities

My uploaded package is not searchable in pypi, neither in pypi web UI nor PIP3

独自空忆成欢 提交于 2020-01-05 06:09:12
问题 I created a package, named furigana . This package page can be browsed by a user not logined to pypi. However, if I type "furigana" in the homepage of pypi, it can not find my package "furigana". I also used pip3 search to search it, and it also find nothing. I ran below commands to create archive and upload it by twine: python3 setup.py test python3 setup.py sdist twine upload dist/furigana-0.0.7.tar.gz The output message of twine is: Uploading distributions to https://upload.pypi.org/legacy

list python-dev as install_requires in setup.py

99封情书 提交于 2020-01-05 04:18:32
问题 Is there a way to tell python in the setup.py file that "python-dev" (which cannot be installed with pip because is a OS package) is necessary and therefore should be installed? How to install it automatically? 回答1: No. For one thing, the python-dev package is specific to Debian-like distributions; there is no guarantee that other distributions will have a package with the same name that fulfills the desired role. For another, the user installing your Python package may have permission to

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

How do I include non-.py files in PyPI?

怎甘沉沦 提交于 2020-01-01 09:44:07
问题 I am a newb to PyPI...so let me qualify with that. I am trying to put a package on PyPI but having a bit of trouble when I try to install it with pip. When I upload the file to PyPI, I get a warning (but the setup.py script finishes with not fatal errors and a 200 status): 'my_package/static/my_folder' not a regular file -- skipping And then when I go to install it in pip, I get an error: "error: can't copy 'my_package/static/my_folder': doesn't exist or not a regular file. From other answers

How do I include non-.py files in PyPI?

我的梦境 提交于 2020-01-01 09:43:28
问题 I am a newb to PyPI...so let me qualify with that. I am trying to put a package on PyPI but having a bit of trouble when I try to install it with pip. When I upload the file to PyPI, I get a warning (but the setup.py script finishes with not fatal errors and a 200 status): 'my_package/static/my_folder' not a regular file -- skipping And then when I go to install it in pip, I get an error: "error: can't copy 'my_package/static/my_folder': doesn't exist or not a regular file. From other answers