]> jfr.im git - yt-dlp.git/blame - setup.py
[ie/youtube] Extract upload timestamp if available (#9856)
[yt-dlp.git] / setup.py
CommitLineData
0abf2f1f 1#!/usr/bin/env python3
2
3# Allow execution from anywhere
4import os
5import sys
6
7sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
8
9import warnings
10
11
12if 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
20elif '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
30else:
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)