Problem with creating PPA

Asked by Himanshu Singh

Hi,
I am working on to create PPA for a python project and working with the latest stable code:
https://static.fossee.in/osdag/installation-files/Osdag_ubuntu_installer_v2018.06.a.3839.tar.gz

It contains two bash scripts one for installing the Miniconda2 and other for installing the dependencies from 'dependencies'folder using command 'conda install'.

I am following two articles one is https://askubuntu.com/questions/71510/how-do-i-create-a-ppa/493577#493577 and other one to create .deb file is https://micropyramid.com/blog/python-to-debian-package-simple-easy-and-fast/.

Following the micropyramid article I got an error when ran command 'fakeroot dpkgn-buildpackage -b'
ERROR: dh clean --with python2
dh: Compatibility levels before 5 are no longer supported (level 1 requested)
debian/rules:3: recipe for target 'clean' failed
make: *** [clean] Error 255

I tried to fix it by writing 10 in debian/compact file, but error remains the same.How can I fix this?
How to manage those two bash scripts and install all those dependencies?
If there is any other way to create PPA please suggest.
I can provide more details if needed. Please help me with this.

Project link: https://github.com/osdag-admin (I am creating PPA for this project)
Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Do you really want to create a PPA (Personal Package Archive), or do you just want to build a .deb package locally?

Are you sure that you didn't mistype the file name ("compact" instead of "compat")?

What is the output of

cat debian/compat

(when located in the right directory)?

Revision history for this message
Himanshu Singh (himanshu1603) said :
#2

Yes, the main goal is to create PPA so, that users can install using PPA.

Sorry, I mistyped "compact" instead of "compat".
The output of the command: cat debian/compat is 10

After correcting typing mistake and ran again, got an error:

dh binary --with python2
   dh_testroot
   dh_prep
   dh_auto_install
 python setup.py install --force --root=/home/himanshu/Desktop/ubtu/debian/osdag --no-compile -O0 --install-layout=deb
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --install-layout not recognized
dh_auto_install: python setup.py install --force --root=/home/himanshu/Desktop/ubtu/debian/osdag --no-compile -O0 --install-layout=deb returned exit code 1
debian/rules:3: recipe for target 'binary' failed
make: *** [binary] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Using setuptools version 41.0.1
Thanks

Revision history for this message
Colin Watson (cjwatson) said :
#3

This isn't a Launchpad-specific problem; it sounds like you're already iterating on this locally, so Launchpad isn't involved except in that it hosts Ubuntu and might potentially host your PPA in the future. As such I'm reassigning this question to Ubuntu.

In this case, it sounds like setup.py is broken somehow, since the normal Python distutils/setuptools frameworks support the --install-layout option. I guess something in the directions you're following has misled you, but I'm afraid Launchpad staff don't have the resources to help with open-ended packaging questions like this.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

For diagnostic purposes please provide the output of the commands

uname -a
lsb_release -crid
dpkg -l | grep setuptools

Revision history for this message
Himanshu Singh (himanshu1603) said :
#5

uname -a
Linux ideapad 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

dpkg -l | grep setuptools
ii python-pbr 3.1.1-3ubuntu3 all inject useful and sensible default behaviors into setuptools - Python 2.x
ii python-setuptools 39.0.1-2 all Python Distutils Enhancements
ii python3-setuptools 39.0.1-2 all Python3 Distutils Enhancements

Is it possible that error can be caused by the default python version?

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

As already written by Colin Watson:
You seem to have a foreign version of setuptools that does not fit to the debhelper packages (your version 41.0.1 versus version 39.0.1 installed by Ubuntu)

Revision history for this message
Himanshu Singh (himanshu1603) said :
#7

Thanks, it worked after changing version of setuptools from 41.0.0 to 39.0.1.
The folder structure is like:
-debian
-osdag
-dependencies
-install-osdag.sh
-setup.py
The bash script is supposed to install python dependencies from dependencies folder using the command 'conda install' and creating workspace folder etc.
I want this script to run during the installation process and install packages. How to manage the dependencies folder and installation script to accomplish this?
How can I include dependency folder so it would be available during installation with PPA?

Thanks again for helping me out.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

I suggest that you read the Ubuntu packaging guide
http://packaging.ubuntu.com
and eventually also the Debian packaging guide (which is also relevant for Ubuntu)
https://wiki.debian.org/Packaging
https://wiki.debian.org/IntroDebianPackaging

Can you help with this problem?

Provide an answer of your own, or ask Himanshu Singh for more information if necessary.

To post a message you must log in.