]>
Commit | Line | Data |
---|---|---|
0abf2f1f | 1 | #!/usr/bin/env python3 |
2 | ||
3 | # Allow execution from anywhere | |
4 | import os | |
5 | import sys | |
6 | ||
7 | sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
8 | ||
9 | import warnings | |
10 | ||
11 | ||
12 | if sys.argv[1:2] == ['py2exe']: | |
13 | warnings.warn(DeprecationWarning('`setup.py py2exe` is deprecated and will be removed in a future version. ' | |
14 | 'Use `bundle.py2exe` instead')) | |
15 | ||
16 | import bundle.py2exe | |
17 | ||
18 | bundle.py2exe.main() | |
19 | ||
20 | elif 'build_lazy_extractors' in sys.argv: | |
21 | warnings.warn(DeprecationWarning('`setup.py build_lazy_extractors` is deprecated and will be removed in a future version. ' | |
22 | 'Use `devscripts.make_lazy_extractors` instead')) | |
23 | ||
24 | import subprocess | |
25 | ||
26 | os.chdir(sys.path[0]) | |
27 | print('running build_lazy_extractors') | |
28 | subprocess.run([sys.executable, 'devscripts/make_lazy_extractors.py']) | |
29 | ||
30 | else: | |
31 | ||
32 | print( | |
33 | 'ERROR: Building by calling `setup.py` is deprecated. ' | |
34 | 'Use a build frontend like `build` instead. ', | |
35 | 'Refer to https://build.pypa.io for more info', file=sys.stderr) | |
36 | sys.exit(1) |