File: rules

package info (click to toggle)
spyder 5.4.2%2Bds-5%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 25,668 kB
  • sloc: python: 103,527; sh: 511; javascript: 131; xml: 121; cpp: 67; makefile: 22; ansic: 19; erlang: 15; lisp: 11; java: 5
file content (38 lines) | stat: -rwxr-xr-x 1,319 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
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

export PYBUILD_NAME=spyder
export PYBUILD_DESTDIR_python3=debian/python3-$(PYBUILD_NAME)
export PYBUILD_INSTALL_ARGS=--install-data=usr
export PYBUILD_AFTER_INSTALL=python3 setup.py install_scripts --skip-build --install-dir={destdir}/usr/bin \
	; rm -f {destdir}/usr/bin/spyder_win_post_install.py

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_clean:
	rm -f debian/spyder.1

execute_before_dh_auto_build:
	# Address https://github.com/spyder-ide/spyder/issues/16995
	chmod a-x spyder/images/dark/* spyder/images/light/*

execute_after_dh_auto_build:
	rst2man debian/manpage.rst > debian/spyder.1

execute_before_dh_install:
	dh_movefiles --package=spyder --sourcedir=$(PYBUILD_DESTDIR_python3) usr/bin usr/share

execute_after_dh_install:
	rm debian/spyder-common/usr/share/spyder/images/LICENSE.txt

execute_after_dh_python3:
	rm -f $(PYBUILD_DESTDIR_python3)/usr/lib/python3/dist-packages/spyder/plugins/ipythonconsole/scripts/conda-activate.bat
	chmod a+x $(PYBUILD_DESTDIR_python3)/usr/lib/python3/dist-packages/spyder/plugins/ipythonconsole/scripts/conda-activate.sh
	find $(PYBUILD_DESTDIR_python3) -type d -empty -delete

# tests cannot run until the package is fully installed
override_dh_auto_test: