mu-editor / mu

A small, simple editor for beginner Python programmers. Written in Python and Qt5.
http://codewith.mu
GNU General Public License v3.0
1.42k stars 437 forks source link

Create a new .deb package so the editor is easy to install on Debian based systems. #58

Closed ntoll closed 4 years ago

ntoll commented 8 years ago

We should package the "Mu" editor for Debian based systems. This will include Debian itself, Ubuntu and, of course, Raspbian.

The package should have three dependencies: python3-pyqt5, python3-pyqt5.qsci and python3-pyqt5.qtserialport.

We should only package the appropriate parts of this repository. The process for packaging and installing from such a package should be documented in the README here:

https://github.com/ntoll/mu/tree/master/package

ntoll commented 8 years ago

@bennuttall this is the ticket for .deb-ifying the editor.

bennuttall commented 8 years ago

Great - thanks

ntoll commented 8 years ago

I'm going to go through this process to get the package into Debian:

https://www.debian.org/devel/wnpp/

asb commented 8 years ago

See PR #102 for a start on this.

carlosperate commented 8 years ago

Unless we want to publish the deb package somewhere else, looks like we can close this issue :)

ntoll commented 8 years ago

Is there a link somewhere "upstream" (Debian?, Raspbian?) to which we can point for the package. It'll mean that this issue resolves by pointing at the solution. :-)

bennuttall commented 8 years ago

This list points at this location where the deb can be found.

bennuttall commented 8 years ago

Also

sudo apt-get update
sudo apt-get install mu
rotacoder commented 8 years ago

I've downloaded the mu binary for my Debian system but when I try to run it I get the error "cannot execute binary file". I assume this is because the binary is for a 64 bit system and I'm running 32 bit. Is this correct and if so will there be a 32 bit binary available in the future? Thanks.

carlosperate commented 8 years ago

Looks like now that Mu has started using PyPI dependencies that might not available through the OS package manager we need to figure out a way to include these. I'm living this link here for future reference, as it might be a good way to solve this: https://github.com/spotify/dh-virtualenv

@asb have you seen or used dh-virtualenv before?

jaustin commented 7 years ago

@carlosperate is this actually fixed now? I notice there's a debian directory rules/control file etc?

carlosperate commented 7 years ago

The dependency issues have been fixed (we have "temporary" fall back on the code due to package rename). The files in the debian directory are up to date (the changelog is in sync with the history file), so a deb file and associates files can be created by running the respective command line tools. As a quick note, if we were to create a new deb file right now, it should be done on https://github.com/mu-editor/mu/commit/c2a0f23e1bd1c5245f877d9c6274dc87bda50b8f , as that's the last documented release. For a newer release we should update the changelog.

jaustin commented 7 years ago

Cool, thanks for the explanation - I wasn't actually planning on building any packages yet, just more interested about how ready it was to happen - Looks like there's not a package in upstream Debian at the moment?

On 4 January 2017 at 13:09, Carlos notifications@github.com wrote:

The dependency issues have been fixed (we have "temporary" fall back on the code due to package rename). The files in the debian directory are up to date (the changelog is in sync with the history file), so a deb file and associates files can be created by running the respective command line tools. As a quick note, if we were to create a new deb file right now, it should be done on c2a0f23 https://github.com/mu-editor/mu/commit/c2a0f23e1bd1c5245f877d9c6274dc87bda50b8f , as that's the last documented release. For a newer release we should update the changelog.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mu-editor/mu/issues/58#issuecomment-270366540, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI-qTwoq1BfcClwxj5oaczNT7TfpwJKks5rO5nzgaJpZM4HCpiE .

gquintana commented 6 years ago

To be able to install a mu .deb package on, at least Debian stable and Ubuntu LTS, some dependencies requirements should be downgraded:

python3-pyqt5       required:5.10 debian_stretch:5.7   ubuntu_xenial:5.5.1 ubuntu_bionic:5.10.1
python3-pyqt5.qsci  required:2.10 debian_stretch:2.9.3 ubuntu_xenial:2.9.1 ubuntu_bionic:2.10.2

This would also make installing mu with pip easier (no specific virtualenv required).

ntoll commented 6 years ago

We're also stymied since there's been zero action on this (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892198) in upstream Debian. Any suggestions for how to move this forward?

gquintana commented 6 years ago

@ntoll An "in between" solution could be to provide a .deb package and let users download it and install it using dpkg -i, at least until this package get published in Debian repos.

bennuttall commented 6 years ago

I believe there's also a plan to have this package available in our PPA: https://launchpad.net/~rpi-distro/+archive/ubuntu/ppa

But yeah, a .deb on the site would be handy too!

ntoll commented 6 years ago

@bennuttall if there's a plan, it'd be good if this were properly communicated. Open collaboration etc etc etc ... (I know I'm preaching to the choir here, just saying this here so it's logged for future reference). ;-)

bennuttall commented 6 years ago

@XECDesign can you confirm it would be possible to add to our PPA once Mu is released?

XECDesign commented 6 years ago

It's possible, but that will be decided once we have a release ready to go for Raspbian. I'd recommend focusing on getting the package into Debian and Ubuntu properly. That will help steer development in the right direction and avoid adding difficult dependencies.

ntoll commented 6 years ago

Hey hey @XECDesign, the only difficult package that I can think of right now is referenced in this bug in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892198

Is there anything we can do to help make this happen..?

XECDesign commented 6 years ago

I haven't been following the development since Peter's feedback, so I don't know how much of it has been addressed. I'm only responsible for getting the release into our distro of Raspbian.

ntoll commented 6 years ago

Completely understand. Busy people are busy (aren't we all?).

Can you suggest anyone upstream-Debian related who may be able to sit down with me (perhaps in London) so I can buy them food/drink in exchange for answering my questions and pointing out how best to unblock the various issues.

See: https://twitter.com/ntoll/status/1004000758352764929

bennuttall commented 6 years ago

@ntoll Have you tried contacting Riverbank about the PyQtCharts package? I don't know if they are responsible or involved in the Debian packages for their software.

ntoll commented 6 years ago

Honestly..? Right now I'm up to my eyes in all sorts of Mu related things which I'm trying hard to juggle, resolve and make good for a 1.0 release. I simply don't have the time to keep asking people (like Riverbank and/or Debian related folks) about yet more stuff they're only going to say they don't have time to do.

My hunch is if Riverbank were responsible for packaging PyQt and associated modules for Debian, it would have already been done. Furthermore, someone may even have replied to my bug report about the missing package.

I can't help but feel like I'm going round and round in circles here. :-(

XECDesign commented 6 years ago

I'm not in that world, so I wouldn't be able to point to anybody. Peter might know of some Debian conventions or meet up groups which could be helpful.

ZanderBrown commented 6 years ago

DebConf is in Taiwan I believe so probably not convenient...

ntoll commented 6 years ago

Taiwan would be fun, if time consuming @ZanderBrown.

@XECDesign, completely understand... I'm just trying to effectively, politely and collaboratively unblock something that's been unresolved for far too long (and which if I could do myself, I would have done ages ago).

gquintana commented 6 years ago

@skitt can you give some advice?

ukBaz commented 6 years ago

No idea how up-to-date the following information is: https://wiki.debian.org/LocalGroups#UK https://blog.einval.com/

ZanderBrown commented 6 years ago

Me & IRC often end badly & I'm really not in the Debian world but let's see if that gets us anywhere

skitt commented 6 years ago

Nice, a Microbit-friendly editor... Tell you what, I’ll take care of PyQtChart; I’ll move the bug to the appropriate place (WNPP as @ntoll just found out on Twitter) and package it up. I can follow up on Mu itself too. (I’m a DD and I maintain a number of Python packages already.)

ntoll commented 6 years ago

Hi @skitt -- first of all, THANK YOU. Secondly, I'm more than prepared to move mountains, do boring stuff etc... assuming the caveat that I'm a technical savvy Debian ignoramus (when it comes to packaging), so if there's anything you need me to do, don't hesitate to ask. Third, I assume this will go something like sid -> test -> stable (when testing is switched to stable). Finally, Just having PyQtChart available is a win, let alone having Mu packaged. Once again, thank you.

russel commented 6 years ago

@skitt I was going to issue a ITP and actually try building the package prior to finding a mentor. I was looking for a suitable package to follow, preferably to create an 'all' package as I believe this package does not require any shared objects – but I may be wrong. If you have a Python package building Git repository for one of the other Python3 packages I'd be happy to chip in by trying to make a workable package for PyQtChart based on it.

ntoll commented 6 years ago

@russel there are already Debian related packaging things in the repos, but they're a bit of a black box and the version numbers of dependencies in setup.py are often > than what's currently in Debian (testing).

skitt commented 6 years ago

@russel oops, sorry, I didn’t mean to step on anybody’s toes. I’ve turned https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892198 into an ITP, if you want it you can take it, or we can work on it together (I’ve started on it but I’m still at the “listing build dependencies” stage). Given that this is a PyQt5 module, the best repository to start from is PyQt5’s in https://salsa.debian.org/python-team/modules/pyqt5. As @ntoll says you’ll need to work with the packages in unstable, the versions in Debian 9 are too old, and anyway packages always target unstable first.

russel commented 6 years ago

@ntoll The debian directory relates to packaging mu itself, a precursor is getting the package python3-pyqt5.qtchart (and python3-pyqt5.qtchart-dbg) created and in Debian Sid. Once that is in place changes will be needed to the mu dependecies in the debian directory files.

My question to @skitt was whether he had a python3-??? package building repository I could use as a paradigm to create one for python3.pyqt5.pychart.

ntoll commented 6 years ago

@russel aha... you're a :star: :-)

russel commented 6 years ago

@skitt Toes not being trodden on at all. The goal is to get the package in as soon as possible. I was just trying to help out after @ntoll 's Twitter request.

The last time I did any packaging was in 2004 when one of my startup staff was deeply into putting stuff into Debian and got us to switch from RH to Debian – damn good choice. He was the DD, I was the person doing what I was told. :-)

I'm a total beginner to modern Debian Packaging, so collaboration with and working to the requirements of a DD sounds excellent. If you want me to act as your gopher on this, that works for me.

(I use Debian Sid and Fedora Rawhide, anything else is far too outdated. I guess I should also have an Arch set up. :-)

ntoll commented 6 years ago

Just a FYI... lost in all the traffic. We aim to be releasing a 1.0 version of Mu very soon. It is that which will need to be the version ultimately packaged. I'm trying to front-load effort so "it just works" when the 1.0 balloon goes up, IYSWIM.

darrell24015 commented 6 years ago

When it gets to the point of testing, I’ll be happy to try out Debian, Ubuntu and Raspbian installs.

russel commented 6 years ago

@skitt If you have a URL for the repository you have for "python3-pyqt5-qtchart" package I'll clone it and see if I can get some positive contributions in place.

plugwash commented 6 years ago

I am a Debian Developer.

I looked at packaging mu a while back, the two main missing dependencies for a reasonably useful mu package seemed to be the pythong qtchart stuff and pygame zero.

I started looking at the pygame zero stuff but ran into a bunch of files of questionable provenance among documentation and examples. I raised this with the author of pygame zero, first by private email and then was later asked to take it to a github issue which I did . Unfortunately things then went quiet. I have now decided to try and package pygame zero without the offending files.

plugwash commented 6 years ago

The github issue for copyright/licensing issues in the documentation/examples for pygame zero is at https://github.com/lordmauve/pgzero/issues/75

skitt commented 6 years ago

I’ve pushed the packaging to https://salsa.debian.org/skitt/pyqt5chart; it works for me, there’s just an issue with one of the debug files I need to check.

russel commented 6 years ago

@skitt I have forked and cloned. In my usual be as literal and irritating as possible mode:

|> python3 configure.py
/bin/sh: 1: ./sip: Permission denied
Error: './sip -V' did not generate any output.

|> which sip
/usr/bin/sip

Is this just a question of removing the ./ so as to get PATH lookup? I'll progress this and look to provide a pull request.

skitt commented 6 years ago

You need to build it as a Debian package, ideally using git-buildpackage:

sudo apt install git-buildpackage pristine-tar build-essential
gbp clone https://salsa.debian.org/skitt/pyqt5chart
cd pyqt5chart
gbp buildpackage -us -uc

This will clone the repository and set everything up so that the archives can also be found for the build. The last step will probably complain about missing dependencies; you’ll need to install those and re-run the build-package step.

russel commented 6 years ago

I'll try that after lunch, gbp installed trivially. The implication here is that the README is not actually giving the right instructions for installation.

skitt commented 6 years ago

Right, and that probably seems weird if you don’t work with Debian source packages all the time ;-). The idea is that Debian source packages contain all the upstream source, including README etc., and all the packaging files go in debian. We don’t adjust upstream instruction to match Debian build instructions (which are always the same in the end: retrieve the source package, and run dpkg-buildpackage; gbp is a convenient wrapper for git-hosted repositories).

russel commented 6 years ago

I did say it was a long time since I had done this stuff. :-)

|> gbp clone https://salsa.debian.org/skitt/pyqt5chart
gbp:info: Cloning from 'https://salsa.debian.org/skitt/pyqt5chart'
|> cd pyqt5chart/
|> gbp build-package -uc -us
'build-package' is not a valid command.

Usage:
    gbp <command> [<args>]

The most commonly used commands are:

    buildpackage - build a Debian package
    import-orig  - import a new upstream tarball
    import-dsc   - import a single Debian source package
    import-dscs  - import multiple Debian source packages

Use '--list-cmds' to list all available commands.

|> gbp buildpackage -uc -us
gbp:info: Creating /home/users/russel/BuildArea/pyqt5chart_5.10.1+dfsg.orig.tar.gz
gbp:error: Error creating pyqt5chart_5.10.1+dfsg.orig.tar.gz: Pristine-tar couldn't checkout "pyqt5chart_5.10.1+dfsg.orig.tar.gz": execution failed: [Errno 2] No such file or directory: 'pristine-tar': 'pristine-tar'