pypi

Python packaging: Boost library as dependency

孤者浪人 提交于 2021-02-20 19:12:53
问题 Assume that someone wants to package a Python (Cython) library that depends on the C++ boost library. What is the best way to configure the setup.py so that the user is properly informed that it is required to install the boost library (i.e., apt-get install libboost-dev in Ubuntu, etc in other OSes)? Or is it a better practice to include the boost library in the python package distribution? 回答1: The question is better asked as What is the best way to distribute a Python extension including

Execute post installation task with pip

本小妞迷上赌 提交于 2021-02-19 08:19:16
问题 My Project Tree Structure . ├── example.gif ├── funmotd │ ├── config.json │ ├── __init__.py │ └── quotes_db.py ├── LICENSE ├── README.md └── setup.py setup.py (Removed some code in order to have less code) import sys import os import setuptools from setuptools.command.install import install class PostInstall(install): def run(self): mode = 0o666 bashrc_file = os.path.join(os.path.expanduser('~'), ".bashrc") install.run(self) # Added CLI to .bashrc # Change "config.json" file permission

How to include an executable file in setup.py

二次信任 提交于 2021-02-10 18:12:33
问题 I have a Python project that uses an executable file. The package structure is something like that: /Project /Package __init__.py aClass.py executableFile LICENSE README.md and I've this setup.py: ... setup( author=... author_email=.... classifiers=[...] description=.... install_requires=[...] license=.. long_description=... include_package_data=True packages=find_packages(include=['Package*']) url=.. version=x.x.x ) but when I upload the package as stated here with twine in PyPI, the

How to include an executable file in setup.py

≡放荡痞女 提交于 2021-02-10 18:05:17
问题 I have a Python project that uses an executable file. The package structure is something like that: /Project /Package __init__.py aClass.py executableFile LICENSE README.md and I've this setup.py: ... setup( author=... author_email=.... classifiers=[...] description=.... install_requires=[...] license=.. long_description=... include_package_data=True packages=find_packages(include=['Package*']) url=.. version=x.x.x ) but when I upload the package as stated here with twine in PyPI, the

How does searching with pip work?

旧街凉风 提交于 2021-02-08 15:11:12
问题 Yes, I'm dead serious with this question. How does searching with pip work? The documentation of the keyword search refers to a "pip search reference" at https://pip.pypa.io/en/stable/user_guide/#searching-for-packages which is everything but a reference. I can't conclude from search attempts how searching works. E.g. if I search for "exec" I get a variety of results such as exec-pypeline (0.4.2) - an incredible python package . I even get results with package names that have nothing to do

How does searching with pip work?

时间秒杀一切 提交于 2021-02-08 15:09:41
问题 Yes, I'm dead serious with this question. How does searching with pip work? The documentation of the keyword search refers to a "pip search reference" at https://pip.pypa.io/en/stable/user_guide/#searching-for-packages which is everything but a reference. I can't conclude from search attempts how searching works. E.g. if I search for "exec" I get a variety of results such as exec-pypeline (0.4.2) - an incredible python package . I even get results with package names that have nothing to do

How does searching with pip work?

倾然丶 夕夏残阳落幕 提交于 2021-02-08 15:06:13
问题 Yes, I'm dead serious with this question. How does searching with pip work? The documentation of the keyword search refers to a "pip search reference" at https://pip.pypa.io/en/stable/user_guide/#searching-for-packages which is everything but a reference. I can't conclude from search attempts how searching works. E.g. if I search for "exec" I get a variety of results such as exec-pypeline (0.4.2) - an incredible python package . I even get results with package names that have nothing to do

How to handle multiple major versions of dependency

余生长醉 提交于 2021-02-08 08:15:24
问题 I'm wondering how to handle multiple major versions of a dependency library. I have an open source library, Foo , at an early release stage. The library is a wrapper around another open source library, Bar . Bar has just launched a new major version. Foo currently only supports the previous version. As I'm guessing that a lot of people will be very slow to convert from the previous major version of Bar to the new major version, I'm reluctant to switch to the new version myself. How is this

Publishing modules to pip and PyPi

…衆ロ難τιáo~ 提交于 2021-02-07 11:13:33
问题 I have created a module using python . I want to publish it to pip and PyPi so that others can download and use it easily. How do I do it? 回答1: The answer can be easily found on the Internet. I just referenced this site to answer you. You can follow the steps below: create an account on PyPi. Create a README.md file as an instruction for users (Highly recommended). Create a setup.cfg file, and write the following content: [metadata] description-file = README.md Create a LICENSE file by

Publishing modules to pip and PyPi

被刻印的时光 ゝ 提交于 2021-02-07 11:12:52
问题 I have created a module using python . I want to publish it to pip and PyPi so that others can download and use it easily. How do I do it? 回答1: The answer can be easily found on the Internet. I just referenced this site to answer you. You can follow the steps below: create an account on PyPi. Create a README.md file as an instruction for users (Highly recommended). Create a setup.cfg file, and write the following content: [metadata] description-file = README.md Create a LICENSE file by