3 # Allow execution from anywhere
7 sys
.path
.insert(0, os
.path
.dirname(os
.path
.abspath(__file__
)))
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'))
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'))
27 print('running build_lazy_extractors')
28 subprocess
.run([sys
.executable
, 'devscripts/make_lazy_extractors.py'])
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
)