mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-23 04:40:06 +00:00
Release cssbeautifier along with the rest
This commit is contained in:
parent
3d92a62fbe
commit
0a09c4b275
1
python/__init__.py
Normal file
1
python/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
# Empty file :)
|
@ -3,29 +3,23 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from setup import PyTest # from setyp.py, not setuptools!
|
||||
|
||||
from setuptools import setup
|
||||
from jsbeautifier.__version__ import __version__
|
||||
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
DIR = 'cssbeautifier/tests/'
|
||||
DIR_CSS = 'cssbeautifier/tests/'
|
||||
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
|
||||
|
||||
class PyTestCSS(PyTest):
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ['--assert=plain'] + \
|
||||
[DIR + x for x in os.listdir(DIR)
|
||||
[DIR_CSS + x for x in os.listdir(DIR_CSS)
|
||||
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='cssbeautifier',
|
||||
version=__version__,
|
||||
@ -47,6 +41,6 @@ setup(name='cssbeautifier',
|
||||
"editorconfig>=0.12.2"],
|
||||
license='MIT',
|
||||
test_suite='pytest.collector',
|
||||
cmdclass={'test': PyTest},
|
||||
cmdclass={'test': PyTestCSS},
|
||||
|
||||
)
|
||||
|
@ -18,6 +18,7 @@ release_python()
|
||||
cd python
|
||||
# python setup.py register -r pypi
|
||||
python setup.py sdist || exit 1
|
||||
python setup-css.py sdist || exit 1
|
||||
python -m twine upload dist/* || exit 1
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user