File: deb_do_not_regenerate_init

package info (click to toggle)
psychopy 2020.2.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 44,056 kB
  • sloc: python: 119,649; javascript: 3,022; makefile: 148; sh: 125; xml: 9
file content (18 lines) | stat: -rw-r--r-- 691 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From: Yaroslav Halchenko <debian@onerussian.com>
Subject: keep __init__.py pristine

Since packaging is based on GIT repository directly, createInitFile is present
in .orig.tar.gz, nevertheless we should not regenerate __init__.py while
setup.py operations are running since it might be ran not within repository any
longer.

--- a/setup.py
+++ b/setup.py
@@ -66,6 +66,7 @@ else:
 # regenerate __init__.py only if we're in the source repos (not in a source zip file)
 try:
     import createInitFile  # won't exist in a sdist.zip
+    raise Exception("createInitFile is shipped in Debian .orig.tar.gz but __init__.py should pristine")
     writeNewInit=True
 except:
     writeNewInit=False