Added distutils facilities to python module.

This commit is contained in:
Stefano Sanfilippo 2011-09-04 22:17:31 +02:00 committed by Einar Lielmanis
parent 15cbbfd30b
commit ee22e4a9f7
3 changed files with 19 additions and 3 deletions

2
python/MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
include js-beautify
include js-beautify-test

View File

@ -5,9 +5,9 @@ where this file was found. Each unpacker must define three symbols:
* `PRIORITY` : integer number expressing the priority in applying this
unpacker. Lower number means higher priority.
Makes sense only if a source file has been packed with more
than one packer.
* `detect(source)` : returns True if source is packed, otherwise, False.
Makes sense only if a source file has been packed with
more than one packer.
* `detect(source)` : returns `True` if source is packed, otherwise, `False`.
* `unpack(source)` : takes a `source` string and unpacks it. Must always return
valid JavaScript. That is to say, your code should look
like:

14
python/setup.py Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python
from distutils.core import setup
setup(name='jsbeautifier',
version='1.0',
description='JavaScript unobfuscator and beautifier.',
author='Einar Lielmanis et al.',
author_email='einar@jsbeautifier.org',
url='http://jsbeautifier.org',
packages=['jsbeautifier', 'jsbeautifier.tests',
'jsbeautifier.unpackers', 'jsbeautifier.unpackers.tests'],
license='MIT',
)