2

Having a directory

root
-setup.py

src/
  -app.py (with main function)

with setup.py

from setuptools import setup


setup(
    name="testing_python_package",
    version=1.0,
    author="Lee",
    description="testing python stuff for deb package",
    packages=["src"],
    entry_points={"console_scripts": ["pytesting=src.app:main"]},
)

my goal is to create a deb package that I can install somewhere else for example (or same machine with dpkg). Read some stuff about it and installed all required stuff. Then I used command

sudo python3 setup.py --command-packages=stdeb.command bdist_deb

for creating source and binary packages but I'm not seeing any .deb files and getting this output + error:

running bdist_deb
running sdist_dsc
running egg_info
writing testing_python_package.egg-info/PKG-INFO
writing dependency_links to testing_python_package.egg-info/dependency_links.txt
writing entry points to testing_python_package.egg-info/entry_points.txt
writing top-level names to testing_python_package.egg-info/top_level.txt
reading manifest file 'testing_python_package.egg-info/SOURCES.txt'
writing manifest file 'testing_python_package.egg-info/SOURCES.txt'
running sdist
warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md

running check
warning: check: missing required meta-data: url

warning: check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too

creating testing_python_package-1.0
creating testing_python_package-1.0/src
creating testing_python_package-1.0/testing_python_package.egg-info
copying files to testing_python_package-1.0...
copying setup.py -> testing_python_package-1.0
copying src/__init__.py -> testing_python_package-1.0/src
copying src/app.py -> testing_python_package-1.0/src
copying testing_python_package.egg-info/PKG-INFO -> testing_python_package-1.0/testing_python_package.egg-info
copying testing_python_package.egg-info/SOURCES.txt -> testing_python_package-1.0/testing_python_package.egg-info
copying testing_python_package.egg-info/dependency_links.txt -> testing_python_package-1.0/testing_python_package.egg-info
copying testing_python_package.egg-info/entry_points.txt -> testing_python_package-1.0/testing_python_package.egg-info
copying testing_python_package.egg-info/top_level.txt -> testing_python_package-1.0/testing_python_package.egg-info
Writing testing_python_package-1.0/setup.cfg
Creating tar archive
removing 'testing_python_package-1.0' (and everything under it)
dpkg-buildpackage: source package testing-python-package
dpkg-buildpackage: source version 1.0-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by unknown <unknown@unknown>
 dpkg-source --before-build testing-python-package-1.0
dpkg-source: info: using options from testing-python-package-1.0/debian/source/options: --extend-diff-ignore=\.egg-info$
dpkg-checkbuilddeps: error: Unmet build dependencies: build-essential:native
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
Traceback (most recent call last):
  File "setup.py", line 10, in <module>
    entry_points={"console_scripts": ["pytesting=src.app:main"]}
  File "/home/USER/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/USER/.local/lib/python3.6/site-packages/stdeb/command/bdist_deb.py", line 34, in run
    self.run_command('sdist_dsc')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/USER/.local/lib/python3.6/site-packages/stdeb/command/sdist_dsc.py", line 144, in run
    ignore_source_changes=self.ignore_source_changes,
  File "/home/USER/.local/lib/python3.6/site-packages/stdeb/util.py", line 1569, in build_dsc
    dpkg_buildpackage(*args, cwd=fullpath_repackaged_dirname)
  File "/home/USER/.local/lib/python3.6/site-packages/stdeb/util.py", line 585, in dpkg_buildpackage
    process_command(args, cwd=cwd)
  File "/home/USER/.local/lib/python3.6/site-packages/stdeb/util.py", line 226, in process_command
    check_call(args, cwd=cwd)
  File "/home/USER/.local/lib/python3.6/site-packages/stdeb/util.py", line 59, in check_call
    raise CalledProcessError(retcode)
stdeb.util.CalledProcessError: 3

What am I doing wrong??

Thank you!

used this as source: Is there a standard way to create Debian packages for distributing Python programs?

Leemosh
  • 883
  • 6
  • 19

0 Answers0