Guest User

Untitled

a guest
Nov 25th, 2016
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.54 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # coding: utf-8
  3.  
  4. from __future__ import print_function
  5.  
  6. import os.path
  7. import warnings
  8. import sys
  9.  
  10. try:
  11.     from setuptools import setup, Command
  12.     setuptools_available = True
  13. except ImportError:
  14.     from distutils.core import setup, Command
  15.     setuptools_available = False
  16. from distutils.spawn import spawn
  17.  
  18. try:
  19.     # This will create an exe that needs Microsoft Visual C++ 2008
  20.     # Redistributable Package
  21.     import py2exe
  22. except ImportError:
  23.     if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
  24.         print('Cannot import py2exe', file=sys.stderr)
  25.         exit(1)
  26.  
  27. py2exe_options = {
  28.     'bundle_files': 1,
  29.     'compressed': 1,
  30.     'optimize': 2,
  31.     'dist_dir': '.',
  32.     'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'],
  33. }
  34.  
  35. # Get the version from youtube_dl/version.py without importing the package
  36. exec(compile(open('comic_dl/version.py').read(),
  37.              'comic_dl/version.py', 'exec'))
  38.  
  39. DESCRIPTION = 'Comic-dl'
  40. LONG_DESCRIPTION = 'Command-line program to download manga and comics from various sites.'
  41.  
  42. py2exe_console = [{
  43.     'script': './comic_dl/comic-dl.py',
  44.     'dest_base': 'comic-dl',
  45.     'version': __version__,
  46.     'description': DESCRIPTION,
  47.     'comments': LONG_DESCRIPTION,
  48.     'product_name': 'comic-dl',
  49.     'product_version': __version__,
  50. }]
  51.  
  52. py2exe_params = {
  53.     'console': py2exe_console,
  54.     'options': {'py2exe': py2exe_options},
  55.     'zipfile': None
  56. }
  57.  
  58. if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
  59.     params = py2exe_params
  60. else:
  61.     print ("Skipping")
  62.  
  63.  
  64. setup(
  65.     name='comic-dl',
  66.     version=__version__,
  67.     description=DESCRIPTION,
  68.     long_description=LONG_DESCRIPTION,
  69.     url='https://github.com/Xonshiz/comic-dl',
  70.     author='Xonshiz',
  71.     author_email='xonshiz@psychoticelites.com',
  72.     packages=[
  73.         'comic_dl',
  74.         'comic_dl.sites', 'comic_dl.downloader'],
  75.  
  76.     # Provokes warning on most systems (why?!)
  77.     # test_suite = 'nose.collector',
  78.     # test_requires = ['nosetest'],
  79.  
  80.     classifiers=[
  81.         'Topic :: Multimedia :: Video',
  82.         'Development Status :: 5 - Production/Stable',
  83.         'Environment :: Console',
  84.         'License :: Public Domain',
  85.         'Programming Language :: Python :: 2.6',
  86.         'Programming Language :: Python :: 2.7',
  87.         'Programming Language :: Python :: 3',
  88.         'Programming Language :: Python :: 3.2',
  89.         'Programming Language :: Python :: 3.3',
  90.         'Programming Language :: Python :: 3.4',
  91.         'Programming Language :: Python :: 3.5',
  92.     ],
  93.  
  94.    
  95. )
Add Comment
Please, Sign In to add comment