File: release_debian

package info (click to toggle)
hyperspy 1.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 85,740 kB
  • sloc: python: 85,925; makefile: 115; ansic: 4; xml: 2
file content (26 lines) | stat: -rwxr-xr-x 867 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/python3
# To produce a binary-only deb file
# Requires python-stdeb, debhelper, dpkg-dev and python-argparser

import argparse
from glob import glob

parser = argparse.ArgumentParser(description='Creates a debian package')

parser.add_argument('-i', '--install', action='store_true',
                    help='Installs the program after packing it')

args = parser.parse_args()

import os
import hyperspy.Release as Release
release_name = 'hyperspy-' + Release.version.replace('.dev', '~dev')
# Delete the deb_dist folder to avoid an error if it contains
# directories from a previous packaging
os.system("rm -rf deb_dist")
os.system('python3 setup.py --command-packages=stdeb.command bdist_deb')

if args.install is True:
    os.system('sudo gdebi %s' % glob('deb_dist/*.deb')[0])
    # Install the dependencies
   # os.system('sudo apt-get install -f')