Create a deb file from a python package

I had to create a deb file from a Python package, so make a note of the procedure

Install a tool to create deb files from python packages

#apt-get install python-stdeb

DL of python package you want to make into a deb file

This time, deb the common component around the DB of OpenStack called oslo.db-1.0.2

$wget https://pypi.python.org/packages/source/o/oslo.db/oslo.db-1.0.2.tar.gz

Run py2dsc

Execute py2dsc with the DL file as an argument

$py2dsc oslo.db-1.0.2.tar.gz

A folder called deb_dest will be created

$ls
deb_dist  oslo.db-1.0.2.tar.gz

Run dpkg-buildpackage under deb_dest / oslo.db-1.0.2

$cd deb_dist/oslo-db-1.0.2
$dpkg-buildpackage -rfakeroot -uc -us
$cd ..
$ls
oslo-db-1.0.2  oslo-db_1.0.2-1_amd64.changes  oslo-db_1.0.2-1.debian.tar.gz  oslo-db_1.0.2-1.dsc  oslo-db-1.0.2.orig  oslo-db_1.0.2.orig.tar.gz  python-oslo.db_1.0.2-1_all.deb

Then the deb file is added.

After that, you can install it with dpkg -i and feel free to do anything.

Recommended Posts

Create a deb file from a python package
Python script to create a JSON file from a CSV file
Create a binary file in Python
[GPS] Create a kml file in Python
Create a Python module
Create a Python environment
Edit Excel from Python to create a PivotTable
Create a C array from a Python> Excel sheet
How to create a JSON file in Python
Create a New Todoist Task from Python Script
Create wav file from GLSL shader using python3
Create a decision tree from 0 with Python (1. Overview)
Create a datetime object from a string in Python (Python 3.3)
Run a Python file from html using Django
Create a Photoshop format file (.psd) with python
Create a package containing global commands in Python
Create a MIDI file in Python using pretty_midi
Read line by line from a file with Python
Create a Wox plugin (Python)
Create a function in Python
Create a dictionary in Python
Make a copy of a Google Drive file from Python
I tried running python etc. from a bat file
Create a python numpy array
Create a dummy data file
[Python] Create a Tkinter program distribution file with cx_Freeze
Create a directory with python
How to create a kubernetes pod from python code
Create a 2d CAD file ".dxf" with python [ezdxf]
[Python] Start a batch file from Python and pass variables.
I made a package to create an executable file from Hy source code
How to use NUITKA-Utilities hinted-compilation to easily create an executable file from a Python script
[Python] Create a file & folder path specification screen with tkinter
Python: Create a dictionary from a list of keys and values
Python> Read from a multi-line string instead of a file> io.StringIO ()
Call a Python function from p5.js.
Touch a Python object from Elixir
Create a python GUI using tkinter
Create a DI Container in Python
Create folders from '01' to '12' with python
Create a pandas Dataframe from a string.
Build a deb file with Docker
Create a Python environment on Mac (2017/4)
How to create a Conda package
Create a virtual environment with Python!
python / Make a dict from a list.
Create a 1MByte random number file
Create a Python general-purpose decorator framework
Create a Kubernetes Operator in Python
5 Ways to Create a Python Chatbot
Create a random string in Python
How to create a config file
Create a file uploader with Django
Create an instance of a predefined class from a string in Python
Create a shell script to run the python file multiple times
Read a file in Python with a relative path from the program
Python vba to create a date string for creating a file name
[Mac] Create a Python3 execution environment from the fully initialized state
How to create a clone from Github
Create a Python function decorator with Class
Creating a simple PowerPoint file with Python