[ie/jiosaavn] Extract via API and fix playlists (#9656)
[yt-dlp.git] / setup.py
blob8d1e6d10b227e146c8720e89b6347a74d8c2343c
1 #!/usr/bin/env python3
3 # Allow execution from anywhere
4 import os
5 import sys
7 sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
9 import warnings
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'))
16 import bundle.py2exe
18 bundle.py2exe.main()
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'))
24 import subprocess
26 os.chdir(sys.path[0])
27 print('running build_lazy_extractors')
28 subprocess.run([sys.executable, 'devscripts/make_lazy_extractors.py'])
30 else:
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)