X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=setup.py;h=c1e923f71fc83717180ee0e356416d1ce4c7c64b;hb=698f127c1a9dd460c8dede59df6a0e2ce69f913a;hp=bfe931f5b42a506ca3cceb1a5ec4acdb6a6a4813;hpb=a8ae232fa9c24534bd9c838c793f182e6796fe4e;p=youtube-dl diff --git a/setup.py b/setup.py index bfe931f5b..c1e923f71 100644 --- a/setup.py +++ b/setup.py @@ -8,11 +8,12 @@ import warnings import sys try: - from setuptools import setup + from setuptools import setup, Command setuptools_available = True except ImportError: - from distutils.core import setup + from distutils.core import setup, Command setuptools_available = False +from distutils.spawn import spawn try: # This will create an exe that needs Microsoft Visual C++ 2008 @@ -70,6 +71,22 @@ else: else: params['scripts'] = ['bin/youtube-dl'] +class build_lazy_extractors(Command): + description = "Build the extractor lazy loading module" + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + spawn( + [sys.executable, 'devscripts/make_lazy_extractors.py', 'youtube_dl/extractor/lazy_extractors.py'], + dry_run=self.dry_run, + ) + # Get the version from youtube_dl/version.py without importing the package exec(compile(open('youtube_dl/version.py').read(), 'youtube_dl/version.py', 'exec')) @@ -105,7 +122,9 @@ setup( "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", ], + cmdclass={'build_lazy_extractors': build_lazy_extractors}, **params )