packaging

Using an extra python package index url with setup.py

Using an extra python package index url with setup.py Question: Is there a way to use an extra Python package index (ala pip –extra-index-url pypi.example.org mypackage) with setup.py so that running python setup.py install can find the packages hosted on pypi.example.org? Asked By: Jeremy || Source Answers: As far as I know, you cant do …

Total answers: 9

Pyinstaller: generate -exe file + folder (in –onefile mode)

Pyinstaller: generate -exe file + folder (in –onefile mode) Question: Now i’m working with Pyinstaller. I have an script which get images from a img folder.. /python |—-/img |—-|—-icon1.ico |—-|—-icon2.ico |—-maint.py My script to generate .exe is pyinstaller.py –windowed –noconsole –clean –onefile maint.py the problem is that only generate the .exe file but the whole …

Total answers: 4

Python Packaging: Data files are put properly in tar.gz file but are not installed to virtual environment

Python Packaging: Data files are put properly in tar.gz file but are not installed to virtual environment Question: I can’t properly install the project package_fiddler to my virtual environment. I have figured out that MANIFEST.in is responsible for putting the non-.py files in Package_fiddler-0.0.0.tar.gz that is generated when executing python setup.py sdist. Then I did: …

Total answers: 5

Setting up setup.py for packaging of a single .py file and a single data file without needing to create any folders

Setting up setup.py for packaging of a single .py file and a single data file without needing to create any folders Question: Project tree: $. ├── happy_birthday-art.txt ├── happy_birthday.py ├── MANIFEST.in ├── README.rst └── setup.py setup.py from setuptools import setup setup( name=’Happy_birthday’, py_modules=[‘happy_birthday’], data_files=[‘happy_birthday-art.txt’], entry_points={ ‘console_scripts’: [‘happy_birthday = happy_birthday:main’, ],}, long_description=open(‘README.rst’).read(), ) Now when I …

Total answers: 2

Create a single executable from a Python project

Create a single executable from a Python project Question: I want to create a single executable from my Python project. A user should be able to download and run it without needing Python installed. If I were just distributing a package, I could use pip, wheel, and PyPI to build and distribute it, but this …

Total answers: 3

Including a directory using Pyinstaller

Including a directory using PyInstaller Question: All of the documentation for PyInstaller talks about including individual files. Is it possible to include a directory, or should I write a function to create the include array by traversing my include directory? Asked By: Simon Knight || Source Answers: Just use glob: from glob import glob datas …

Total answers: 5

Differences between distribute, distutils, setuptools and distutils2?

Differences between distribute, distutils, setuptools and distutils2? Question: The Situation I’m trying to port an open-source library to Python 3. (SymPy, if anyone is wondering.) So, I need to run 2to3 automatically when building for Python 3. To do that, I need to use distribute. Therefore, I need to port the current system, which (according …

Total answers: 5

Can we shed some definitive light on how python packaging and import works?

Can we shed some definitive light on how python packaging and import works? Question: I had my fair chance of getting through the python management of modules, and every time is a challenge: packaging is not what people do every day, and it becomes a burden to learn, and a burden to remember, even when …

Total answers: 4

How should I structure a Python package that contains Cython code

How should I structure a Python package that contains Cython code Question: I’d like to make a Python package containing some Cython code. I’ve got the the Cython code working nicely. However, now I want to know how best to package it. For most people who just want to install the package, I’d like to …

Total answers: 10