setuptools

Building a module with setuptools and swig

微笑、不失礼 提交于 2020-06-13 12:29:30
问题 I have a bunch of SWIG interfaces (foo.i, bar.i, etc.). I want to build them into a Python (3.6.4) module for my platform (MS Windows), with setuptools. The module should include the SWIG-generated Python files (*.py), the binary extensions (*.pyd) and the compiled caches (*.pyc). My setup.py is essentially like this: from setuptools import setup, Extension from pathlib import Path paths=list(Path('.').glob('*.i')) py=[path.stem for path in paths] ext=[Extension('_' + path.stem, [str(path)])

Building a Python-C-Extension on Windows with a debug Python installation

为君一笑 提交于 2020-06-12 11:41:28
问题 If I build CPython from source on Windows I encounter problems when I want to pip install a package that contains a C-Extension. It seems like the error happens while linking the libraries. For example when installing cython (but it also crashes with the same error on other C extension packages): LINK : fatal error LNK1104: cannot open file 'python38.lib' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\link.exe' failed

why do I keep getting this message when installing saying EntryPoint must be in 'name=module:attrs [extras]

岁酱吖の 提交于 2020-06-11 16:54:26
问题 Hi I am on OSx Mavericks, using python 2.7 and pip version 6.0.8 and setuptools version 12.2. When I try to install my project I get warning messages but installs successfully $ python setup.py install --user if I use distutils I get below message which probably its setup doesn't have kwarg entry_points. /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py: 267: UserWarning: Unknown distribution option: 'entry_points' warnings.warn(msg) but when I try to install

Error occurred during build: Command setuptools failed

你离开我真会死。 提交于 2020-06-01 05:06:29
问题 I am trying to deploy an application on AWS but struck at this error and couldn't find how to make it work. Error: Error occurred during build: Command setuptools failed 01_packages.config packages: yum: git: [] postgresql-devel: [] libjpeg-turbo-devel: [] commands: setuptools: command: /opt/python/run/venv/bin/pip install setuptools --upgrade I guess there's been change in AWS Recently as this was working in my previous deployments. Also I had to change postgresql93-devel: [] to postgresql

How to include (script-built) libraries with package installation?

浪尽此生 提交于 2020-06-01 03:23:26
问题 I am making a Python package that has a C++-extension module and someone else's shared library that it requires. I want everything installable via pip . My current setup.py file works when I use pip install -e . but when I don't use develop mode (e.i. omit the -e ) I get "cannot open shared object file" when importing the module in Python. I believe the reason is that setuptools doesn't consider the shared library to be part of my package, so the relative link to the library is broken during

How to include (script-built) libraries with package installation?

天大地大妈咪最大 提交于 2020-06-01 03:23:13
问题 I am making a Python package that has a C++-extension module and someone else's shared library that it requires. I want everything installable via pip . My current setup.py file works when I use pip install -e . but when I don't use develop mode (e.i. omit the -e ) I get "cannot open shared object file" when importing the module in Python. I believe the reason is that setuptools doesn't consider the shared library to be part of my package, so the relative link to the library is broken during

python - setup.py sdist bdist_wheel

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-14 14:41:25
问题 I decided to create a small little module named "NsmPY". Once I had finished the code behind the module (available on GitHub), I got to work trying to upload this new module to PyPi. However, when I ran the necessary command python3 setup.py sdist bdist_wheel , the program spat out an error: running sdist running egg_info writing nsmpy.egg-info\PKG-INFO writing dependency_links to nsmpy.egg-info\dependency_links.txt writing top-level names to nsmpy.egg-info\top_level.txt reading manifest file

Equivalent for `--find-links` in `setup.py`

旧巷老猫 提交于 2020-04-02 09:02:12
问题 What is the equivalent of --find-links / -f flag for pip in setup.py . I know dependency_links exist, but that requires pointing to a specific file, I want something similar to -f that can point to a list of links from which the package can be selected based on version&os. 回答1: In a setuptools context the dependency_links option should do what you need. According to setuptools documentation, this option accepts: the URLs of web pages that contain direct download links for example: setuptools

Equivalent for `--find-links` in `setup.py`

泪湿孤枕 提交于 2020-04-02 09:01:52
问题 What is the equivalent of --find-links / -f flag for pip in setup.py . I know dependency_links exist, but that requires pointing to a specific file, I want something similar to -f that can point to a list of links from which the package can be selected based on version&os. 回答1: In a setuptools context the dependency_links option should do what you need. According to setuptools documentation, this option accepts: the URLs of web pages that contain direct download links for example: setuptools

Equivalent for `--find-links` in `setup.py`

霸气de小男生 提交于 2020-04-02 09:00:14
问题 What is the equivalent of --find-links / -f flag for pip in setup.py . I know dependency_links exist, but that requires pointing to a specific file, I want something similar to -f that can point to a list of links from which the package can be selected based on version&os. 回答1: In a setuptools context the dependency_links option should do what you need. According to setuptools documentation, this option accepts: the URLs of web pages that contain direct download links for example: setuptools