File: setup.py

package info (click to toggle)
node-js-beautify 1.7.5%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,400 kB
  • sloc: python: 10,222; sh: 848; makefile: 17
file content (43 lines) | stat: -rwxr-xr-x 1,525 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python

import os,sys

from setuptools import setup
from jsbeautifier.__version__ import __version__

from setuptools.command.test import test as TestCommand

DIR='jsbeautifier/tests/'
class PyTest(TestCommand):
    user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = ['--assert=plain'] +[DIR+x for x in os.listdir(DIR) if x.endswith('.py') and x[0] not in '._']

    def run_tests(self):
        #import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.pytest_args)
        sys.exit(errno)

setup(name='jsbeautifier',
      version=__version__,
      description='JavaScript unobfuscator and beautifier.',
      long_description=('Beautify, unpack or deobfuscate JavaScript. '
                        'Handles popular online obfuscators.'),
      author='Einar Lielmanis, Stefano Sanfilippo et al.',
      author_email='einar@jsbeautifier.org',
      url='http://jsbeautifier.org',
      scripts=['js-beautify'],
      packages=['jsbeautifier',
                'jsbeautifier.tests', 'jsbeautifier.tests.generated',
                'jsbeautifier.core',
                'jsbeautifier.javascript',
                'jsbeautifier.unpackers', 'jsbeautifier.unpackers.tests'],
      install_requires=["six>=1.6.1", "editorconfig>=0.12.0"],
      license='MIT',
      test_suite='pytest.collector',
      cmdclass = {'test': PyTest},

     )