Help us understand the problem. What is going on with this article?

pythonパッケージからdebファイルを作成する

More than 3 years have passed since last update.

Pythonパッケージからdebファイルを作成する必要があったのでその手順をメモ

pythonパッケージからdebファイルを作成するツールをインストール

#apt-get install python-stdeb

 

debファイル化したい、pythonパッケージのDL

今回は、oslo.db-1.0.2というOpenStackのDB周りの共通コンポーネントをdeb化する

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

py2dscの実行

DLしたファイルを引数に py2dsc を実行

$py2dsc oslo.db-1.0.2.tar.gz

deb_destというフォルダが作成されます

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

deb_dest/oslo.db-1.0.2の下で dpkg-buildpackage を実行

$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

するとdebファイルが追加されています。

あとは dpkg -i でインストールしたりいろいろとご自由に

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした