Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #10250 > unrolled thread

How to package my python module ?

Started by慕冬亮 <mudongliangabcd@gmail.com>
First post2018-03-16 03:30 +0100
Last post2018-03-16 05:20 +0100
Articles 13 — 4 participants

Back to article view | Back to linux.debian.maint.python


Contents

  How to package my python module ? 慕冬亮 <mudongliangabcd@gmail.com> - 2018-03-16 03:30 +0100
    Re: How to package my python module ? Ben Finney <bignose@debian.org> - 2018-03-16 04:30 +0100
      Re: How to package my python module ? 慕冬亮 <mudongliangabcd@gmail.com> - 2018-03-16 04:50 +0100
        Re: How to package my python module ? 慕冬亮 <mudongliangabcd@gmail.com> - 2018-03-16 05:20 +0100
          Re: How to package my python module ? Ben Finney <bignose@debian.org> - 2018-03-16 05:30 +0100
            Re: How to package my python module ? 慕冬亮 <mudongliangabcd@gmail.com> - 2018-03-16 06:00 +0100
              Re: How to package my python module ? 慕冬亮 <mudongliangabcd@gmail.com> - 2018-03-16 22:20 +0100
                Re: How to package my python module ? Scott Kitterman <debian@kitterman.com> - 2018-03-16 22:30 +0100
                Re: How to package my python module ? Georg Faerber <georg@riseup.net> - 2018-03-16 22:30 +0100
                  Re: How to package my python module ? Ben Finney <bignose@debian.org> - 2018-03-17 07:10 +0100
                    Re: How to package my python module ? 慕冬亮 <mudongliangabcd@gmail.com> - 2018-03-17 20:10 +0100
                      Re: How to package my python module ? Ben Finney <bignose@debian.org> - 2018-03-17 20:40 +0100
        Re: How to package my python module ? Ben Finney <bignose@debian.org> - 2018-03-16 05:20 +0100

#10250 — How to package my python module ?

From慕冬亮 <mudongliangabcd@gmail.com>
Date2018-03-16 03:30 +0100
SubjectHow to package my python module ?
Message-ID<vtNi2-3ML-5@gated-at.bofh.it>
Dear all,

I have a simple python module - https://pypi.python.org/pypi/youdao-simple.

The source code is deployed on the Github -
https://github.com/mudongliang/youdao-python

If someone could give some tips to package this python module, I will
appreciate it.

P.S. I don't know whether this is right mailing list to ask this question.


--
My best regards to you.

     No System Is Safe!
     Dongliang Mu

[toc] | [next] | [standalone]


#10251

FromBen Finney <bignose@debian.org>
Date2018-03-16 04:30 +0100
Message-ID<vtOe5-4Mg-1@gated-at.bofh.it>
In reply to#10250
慕冬亮 <mudongliangabcd@gmail.com> writes:

> If someone could give some tips to package this python module, I will
> appreciate it.
>
> P.S. I don't know whether this is right mailing list to ask this
> question.

Welcome. This forum is to discuss the packaging of Python works, to
become part of the Debian operating system.

If you are intending to maintain a package indefinitely in the Debian
operating system, then this is the right forum :-)

To learn how to package software as part of Debian, start with
<URL:https://mentors.debian.net/intro>.

-- 
 \         “We now have access to so much information that we can find |
  `\  support for any prejudice or opinion.” —David Suzuki, 2008-06-27 |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#10252

From慕冬亮 <mudongliangabcd@gmail.com>
Date2018-03-16 04:50 +0100
Message-ID<vtOxr-4Yu-1@gated-at.bofh.it>
In reply to#10251
Hi Ben,

I am very glad to get your response. But for your link, I encounter
"Internal error 404" :(
--
My best regards to you.

     No System Is Safe!
     Dongliang Mu


On Thu, Mar 15, 2018 at 10:57 PM, Ben Finney <bignose@debian.org> wrote:
> 慕冬亮 <mudongliangabcd@gmail.com> writes:
>
>> If someone could give some tips to package this python module, I will
>> appreciate it.
>>
>> P.S. I don't know whether this is right mailing list to ask this
>> question.
>
> Welcome. This forum is to discuss the packaging of Python works, to
> become part of the Debian operating system.
>
> If you are intending to maintain a package indefinitely in the Debian
> operating system, then this is the right forum :-)
>
> To learn how to package software as part of Debian, start with
> <URL:https://mentors.debian.net/intro>.
>
> --
>  \         “We now have access to so much information that we can find |
>   `\  support for any prejudice or opinion.” —David Suzuki, 2008-06-27 |
> _o__)                                                                  |
> Ben Finney

[toc] | [prev] | [next] | [standalone]


#10253

From慕冬亮 <mudongliangabcd@gmail.com>
Date2018-03-16 05:20 +0100
Message-ID<vtP0u-5zi-9@gated-at.bofh.it>
In reply to#10252
On Thu, Mar 15, 2018 at 11:57 PM, Ben Finney <bignose@debian.org> wrote:
> 慕冬亮 <mudongliangabcd@gmail.com> writes:
>
>> I am very glad to get your response. But for your link, I encounter
>> "Internal error 404" :(
>
> Sorry about that! I typed the wrong URL, the correct URL is
> <URL:https://mentors.debian.net/intro-maintainers>.
>

Thanks.

> Meanwhile, can you confirm you are wanting to become a package
> maintainer of the Debian package for the Python library?
>

I am sure I would like to become to a package maintainer of the Debian package.
It's my honor. And I am a big fan of Debian System. I have been
exploring the Debian
World in four to five years.

> --
>  \          “If we could change ourselves, the tendencies in the world |
>   `\  would also change.” —Mohandas K. Gandhi, _Collected Works_, 1913 |
> _o__)                                                                  |
> Ben Finney <bignose@debian.org>

--
My best regards to you.

     No System Is Safe!
     Dongliang Mu

[toc] | [prev] | [next] | [standalone]


#10255

FromBen Finney <bignose@debian.org>
Date2018-03-16 05:30 +0100
Message-ID<vtPa9-5FP-1@gated-at.bofh.it>
In reply to#10253
慕冬亮 <mudongliangabcd@gmail.com> writes:

> I am sure I would like to become to a package maintainer of the Debian
> package. It's my honor. And I am a big fan of Debian System. I have
> been exploring the Debian World in four to five years.

Great!

This forum is good for discussions specific to packaging Python in
Debian.

To learn Debian packaging, you will also want to subscribe to the
Mentors forum <URL:https://lists.debian.org/debian-mentors/> which is
specific for teaching people to become Debian maintainers.

-- 
 \        “If you go parachuting, and your parachute doesn't open, and |
  `\        you friends are all watching you fall, I think a funny gag |
_o__)             would be to pretend you were swimming.” —Jack Handey |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#10256

From慕冬亮 <mudongliangabcd@gmail.com>
Date2018-03-16 06:00 +0100
Message-ID<vtPDb-600-1@gated-at.bofh.it>
In reply to#10255
On Fri, Mar 16, 2018 at 12:21 AM, Ben Finney <bignose@debian.org> wrote:
> 慕冬亮 <mudongliangabcd@gmail.com> writes:
>
>> I am sure I would like to become to a package maintainer of the Debian
>> package. It's my honor. And I am a big fan of Debian System. I have
>> been exploring the Debian World in four to five years.
>
> Great!
>
> This forum is good for discussions specific to packaging Python in
> Debian.
>

I would like to pick up one orphaned software before, but I was busy
in previous months.
So it is delayed. And I want to learn from packaging my own python
package. Then if I have
more free time, I will try that plan.

> To learn Debian packaging, you will also want to subscribe to the
> Mentors forum <URL:https://lists.debian.org/debian-mentors/> which is
> specific for teaching people to become Debian maintainers.
>

I subscribed this mailing list just a moment ago.

> --
>  \        “If you go parachuting, and your parachute doesn't open, and |
>   `\        you friends are all watching you fall, I think a funny gag |
> _o__)             would be to pretend you were swimming.” —Jack Handey |
> Ben Finney
>

--
My best regards to you.

     No System Is Safe!
     Dongliang Mu

[toc] | [prev] | [next] | [standalone]


#10258

From慕冬亮 <mudongliangabcd@gmail.com>
Date2018-03-16 22:20 +0100
Message-ID<vu4Vz-1rI-9@gated-at.bofh.it>
In reply to#10256
Hi all,

after I read the material Ben sent to me, I have a understanding of
the whole process.

At first, I need to package my python module as a Debian package.

Second, I need to find one sponsor to upload my package to the Debian
software repository(for now I don't have the privilege);

Finally, after I am able to handle this procedure and believed by
sponsor, maybe I could get limited upload privilege.

I have registered in the mentors website and uploaded my GPG key. Now
it comes to one problem - how do I package my python module?

For the materials about packaging a debian package, it is related one
general debian package. Is there document about how to package
one python module? Or find one debian package which is also python
module and borrow some experience from it?


--
My best regards to you.

     No System Is Safe!
     Dongliang Mu


On Fri, Mar 16, 2018 at 12:58 AM, 慕冬亮 <mudongliangabcd@gmail.com> wrote:
> On Fri, Mar 16, 2018 at 12:21 AM, Ben Finney <bignose@debian.org> wrote:
>> 慕冬亮 <mudongliangabcd@gmail.com> writes:
>>
>>> I am sure I would like to become to a package maintainer of the Debian
>>> package. It's my honor. And I am a big fan of Debian System. I have
>>> been exploring the Debian World in four to five years.
>>
>> Great!
>>
>> This forum is good for discussions specific to packaging Python in
>> Debian.
>>
>
> I would like to pick up one orphaned software before, but I was busy
> in previous months.
> So it is delayed. And I want to learn from packaging my own python
> package. Then if I have
> more free time, I will try that plan.
>
>> To learn Debian packaging, you will also want to subscribe to the
>> Mentors forum <URL:https://lists.debian.org/debian-mentors/> which is
>> specific for teaching people to become Debian maintainers.
>>
>
> I subscribed this mailing list just a moment ago.
>
>> --
>>  \        “If you go parachuting, and your parachute doesn't open, and |
>>   `\        you friends are all watching you fall, I think a funny gag |
>> _o__)             would be to pretend you were swimming.” —Jack Handey |
>> Ben Finney
>>
>
> --
> My best regards to you.
>
>      No System Is Safe!
>      Dongliang Mu

[toc] | [prev] | [next] | [standalone]


#10259

FromScott Kitterman <debian@kitterman.com>
Date2018-03-16 22:30 +0100
Message-ID<vu55f-1uL-1@gated-at.bofh.it>
In reply to#10258
https://wiki.debian.org/Python#Encouraged_practices

On March 16, 2018 9:16:23 PM UTC, "慕冬亮" <mudongliangabcd@gmail.com> wrote:
>Hi all,
>
>after I read the material Ben sent to me, I have a understanding of
>the whole process.
>
>At first, I need to package my python module as a Debian package.
>
>Second, I need to find one sponsor to upload my package to the Debian
>software repository(for now I don't have the privilege);
>
>Finally, after I am able to handle this procedure and believed by
>sponsor, maybe I could get limited upload privilege.
>
>I have registered in the mentors website and uploaded my GPG key. Now
>it comes to one problem - how do I package my python module?
>
>For the materials about packaging a debian package, it is related one
>general debian package. Is there document about how to package
>one python module? Or find one debian package which is also python
>module and borrow some experience from it?
>
>
>--
>My best regards to you.
>
>     No System Is Safe!
>     Dongliang Mu
>
>
>On Fri, Mar 16, 2018 at 12:58 AM, 慕冬亮 <mudongliangabcd@gmail.com>
>wrote:
>> On Fri, Mar 16, 2018 at 12:21 AM, Ben Finney <bignose@debian.org>
>wrote:
>>> 慕冬亮 <mudongliangabcd@gmail.com> writes:
>>>
>>>> I am sure I would like to become to a package maintainer of the
>Debian
>>>> package. It's my honor. And I am a big fan of Debian System. I have
>>>> been exploring the Debian World in four to five years.
>>>
>>> Great!
>>>
>>> This forum is good for discussions specific to packaging Python in
>>> Debian.
>>>
>>
>> I would like to pick up one orphaned software before, but I was busy
>> in previous months.
>> So it is delayed. And I want to learn from packaging my own python
>> package. Then if I have
>> more free time, I will try that plan.
>>
>>> To learn Debian packaging, you will also want to subscribe to the
>>> Mentors forum <URL:https://lists.debian.org/debian-mentors/> which
>is
>>> specific for teaching people to become Debian maintainers.
>>>
>>
>> I subscribed this mailing list just a moment ago.
>>
>>> --
>>>  \        “If you go parachuting, and your parachute doesn't open,
>and |
>>>   `\        you friends are all watching you fall, I think a funny
>gag |
>>> _o__)             would be to pretend you were swimming.” —Jack
>Handey |
>>> Ben Finney
>>>
>>
>> --
>> My best regards to you.
>>
>>      No System Is Safe!
>>      Dongliang Mu

[toc] | [prev] | [next] | [standalone]


#10260

FromGeorg Faerber <georg@riseup.net>
Date2018-03-16 22:30 +0100
Message-ID<vu55f-1uL-9@gated-at.bofh.it>
In reply to#10258

[Multipart message — attachments visible in raw view] — view raw

Hi,

On 18-03-16 17:16:23, 慕冬亮 wrote:
> after I read the material Ben sent to me, I have a understanding of
> the whole process.
> 
> At first, I need to package my python module as a Debian package.
> 
> Second, I need to find one sponsor to upload my package to the Debian
> software repository(for now I don't have the privilege);
> 
> Finally, after I am able to handle this procedure and believed by
> sponsor, maybe I could get limited upload privilege.

It might need some time up until you become a DM to be able to upload
packages on your own, but in general, the above is correct.

> I have registered in the mentors website and uploaded my GPG key. Now
> it comes to one problem - how do I package my python module?

Great!

> For the materials about packaging a debian package, it is related one
> general debian package. Is there document about how to package
> one python module? Or find one debian package which is also python
> module and borrow some experience from it?

Have a look into the git repositories of other Python packages [1].
Also, these wiki articles [2] [3] might be worth a read.

All the best,
cheers,
Georg


[1] https://salsa.debian.org/python-team/modules
[2] https://wiki.debian.org/Python/LibraryStyleGuide
[3] https://wiki.debian.org/Python/AppStyleGuide

[toc] | [prev] | [next] | [standalone]


#10264

FromBen Finney <bignose@debian.org>
Date2018-03-17 07:10 +0100
Message-ID<vudct-6ZH-1@gated-at.bofh.it>
In reply to#10260
Georg Faerber <georg@riseup.net> writes:

> On 18-03-16 17:16:23, 慕冬亮 wrote:
> > I need to find one sponsor to upload my package to the Debian
> > software repository(for now I don't have the privilege);
>
> It might need some time up until you become a DM to be able to upload
> packages on your own, but in general, the above is correct.

Before then, as you can read in the introductory document
<URL:https://mentors.debian.net/intro-maintainers>, you can publish to
the Mentors repository for review by mentors.

That is the whole purpose of the Mentors package repository :-)

-- 
 \            “Politics is not the art of the possible. It consists in |
  `\       choosing between the disastrous and the unpalatable.” —John |
_o__)                                    Kenneth Galbraith, 1962-03-02 |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#10266

From慕冬亮 <mudongliangabcd@gmail.com>
Date2018-03-17 20:10 +0100
Message-ID<vupnj-6cM-7@gated-at.bofh.it>
In reply to#10264
Hi all,

thanks for your tips.

First, I refer to [1] and all the previous materials in the mailing
list to generate all the debian metadata files. During this step,
some commands are very useful, including dch -i/-a.

For now, I have submitted all the debian metadata files to [my Github
repo](https://github.com/mudongliang/youdao-python).

Second, I use "debuild" to build and sign the deb package. But I got one error :

>  dpkg-buildpackage -rfakeroot -us -uc -ui
> dpkg-buildpackage: info: source package youdao-python
> dpkg-buildpackage: info: source version 1.1.0
> dpkg-buildpackage: info: source distribution UNRELEASED
> dpkg-buildpackage: info: source changed by Dongliang Mu <mudongliangabcd@gmail.com>
> dpkg-source --before-build youdao-python
> dpkg-buildpackage: info: host architecture amd64
> debian/rules clean
> dh clean --with python2,python3 --buildsystem=pybuild
>   dh_auto_clean -O--buildsystem=pybuild
> I: pybuild base:184: python2.7 setup.py clean
> running clean
> removing '/home/mdl/Repos/Github/youdao-python/.pybuild/pythonX.Y_2.7/build' (and everything under it)
> 'build/bdist.linux-amd64' does not exist -- can't clean it
> 'build/scripts-2.7' does not exist -- can't clean it
>   dh_clean -O--buildsystem=pybuild
> dpkg-source -b youdao-python
> dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../youdao-python_1.1.0.orig.tar.{bz2,gz,lzma,xz}
> dpkg-buildpackage: error: dpkg-source -b youdao-python subprocess returned exit status 25
> debuild: fatal error at line 1152:
> dpkg-buildpackage -rfakeroot -us -uc -ui failed

>From [2], I just used that answer and build the package successfully.
Finally I got two files:

youdao-python_1.1.0_all.deb, youdao-python_1.1.0_amd64.changes

Finally, I used "lintian" and "debc" to check the status of packaging:

youdao-python_1.1.0_all.deb
---------------------------
 new Debian package, version 2.0.
 size 4588 bytes: control archive=1048 bytes.
     380 bytes,    11 lines      control
     819 bytes,     9 lines      md5sums
     163 bytes,     9 lines   *  postinst             #!/bin/sh
     265 bytes,    14 lines   *  prerm                #!/bin/sh
 Package: youdao-python
 Version: 1.1.0
 Architecture: all
 Maintainer: Dongliang Mu <mudongliangabcd@gmail.com>
 Installed-Size: 29
 Depends: python:any (<< 2.8), python:any (>= 2.7.5-5~)
 Section: misc
 Priority: optional
 Homepage: https://github.com/mudongliang/youdao-python
 Description: youdao dictionary implemented in python
   Simple Youdao Dictionary implemented by python module
drwxr-xr-x root/root         0 2018-03-17 13:20 ./
drwxr-xr-x root/root         0 2018-03-17 13:20 ./usr/
drwxr-xr-x root/root         0 2018-03-17 13:20 ./usr/bin/
-rwxr-xr-x root/root       397 2018-03-17 13:20 ./usr/bin/youdao
drwxr-xr-x root/root         0 2018-03-17 13:20 ./usr/lib/
drwxr-xr-x root/root         0 2018-03-17 13:20 ./usr/lib/python2.7/
drwxr-xr-x root/root         0 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/
drwxr-xr-x root/root         0 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple/
-rw-r--r-- root/root        39 2018-03-16 00:49
./usr/lib/python2.7/dist-packages/youdao_simple/__init__.py
-rw-r--r-- root/root      3883 2018-03-16 01:02
./usr/lib/python2.7/dist-packages/youdao_simple/youdao.py
drwxr-xr-x root/root         0 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/
-rw-r--r-- root/root      3402 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/PKG-INFO
-rw-r--r-- root/root         1 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/dependency_links.txt
-rw-r--r-- root/root        54 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/entry_points.txt
-rw-r--r-- root/root        14 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/top_level.txt
drwxr-xr-x root/root         0 2018-03-17 13:20 ./usr/share/
drwxr-xr-x root/root         0 2018-03-17 13:20 ./usr/share/doc/
drwxr-xr-x root/root         0 2018-03-17 13:20 ./usr/share/doc/youdao-python/
-rw-r--r-- root/root       160 2018-03-17 13:20
./usr/share/doc/youdao-python/changelog.gz
-rw-r--r-- root/root       471 2018-03-17 13:15
./usr/share/doc/youdao-python/copyright

What should I do now? If you find any issue in my procedure, please let me know.

[1] https://blog.packagecloud.io/debian/debuild/packaging/2015/06/08/buildling-deb-packages-with-debuild/
[2] https://askubuntu.com/questions/675154/dpkg-buildpackage-dpkg-source-no-upstream-tarball-found
--
My best regards to you.

     No System Is Safe!
     Dongliang Mu


On Sat, Mar 17, 2018 at 1:58 AM, Ben Finney <bignose@debian.org> wrote:
> Georg Faerber <georg@riseup.net> writes:
>
>> On 18-03-16 17:16:23, 慕冬亮 wrote:
>> > I need to find one sponsor to upload my package to the Debian
>> > software repository(for now I don't have the privilege);
>>
>> It might need some time up until you become a DM to be able to upload
>> packages on your own, but in general, the above is correct.
>
> Before then, as you can read in the introductory document
> <URL:https://mentors.debian.net/intro-maintainers>, you can publish to
> the Mentors repository for review by mentors.
>
> That is the whole purpose of the Mentors package repository :-)
>
> --
>  \            “Politics is not the art of the possible. It consists in |
>   `\       choosing between the disastrous and the unpalatable.” —John |
> _o__)                                    Kenneth Galbraith, 1962-03-02 |
> Ben Finney
>

[toc] | [prev] | [next] | [standalone]


#10267

FromBen Finney <bignose@debian.org>
Date2018-03-17 20:40 +0100
Message-ID<vupQl-6nt-3@gated-at.bofh.it>
In reply to#10266
慕冬亮 <mudongliangabcd@gmail.com> writes:

> thanks for your tips.

(To participate in email discussions, please don't top-post. Instead,
learn to interleave your replies in response to the text to which you
are responding. See this article for more
<URL:https://en.wikipedia.org/wiki/Posting_style#Interleaved_style>.

This message I'm posting is an example of how to do that.)

> For now, I have submitted all the debian metadata files to [my Github
> repo](https://github.com/mudongliang/youdao-python).

The Debian Project has Git hosting for packaging work. You should
maintain your packaging files in a VCS repository at
<URL:https://salsa.debian.org/>. This will make it easier for other
Debian Project members to collaborate with you.

> […]
> Finally I got two files:
> youdao-python_1.1.0_all.deb, youdao-python_1.1.0_amd64.changes
>
> What should I do now?

Upload the Debian source package to the Mentors package repository, then
report an RFS (Request For Sponsor) bug report for the package. Read
<URL:https://mentors.debian.net/intro-maintainers> for how to do these.

-- 
 \       “… one of the main causes of the fall of the Roman Empire was |
  `\        that, lacking zero, they had no way to indicate successful |
_o__)                  termination of their C programs.” —Robert Firth |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#10254

FromBen Finney <bignose@debian.org>
Date2018-03-16 05:20 +0100
Message-ID<vtP0u-5zi-11@gated-at.bofh.it>
In reply to#10252
慕冬亮 <mudongliangabcd@gmail.com> writes:

> I am very glad to get your response. But for your link, I encounter
> "Internal error 404" :(

Sorry about that! I typed the wrong URL, the correct URL is
<URL:https://mentors.debian.net/intro-maintainers>.

Meanwhile, can you confirm you are wanting to become a package
maintainer of the Debian package for the Python library?

-- 
 \          “If we could change ourselves, the tendencies in the world |
  `\  would also change.” —Mohandas K. Gandhi, _Collected Works_, 1913 |
_o__)                                                                  |
Ben Finney <bignose@debian.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web