Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix show readme.md in PyPi pages #2306

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/setup-css.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python
from pathlib import Path
import os
import sys

from setuptools import setup
from cssbeautifier.__version__ import __version__
Expand All @@ -8,7 +11,8 @@
name="cssbeautifier",
version=__version__,
description="CSS unobfuscator and beautifier.",
long_description=("Beautify, unpack or deobfuscate CSS"),
long_description=Path("README.md").read_text(),
long_description_content_type="text/markdown",
author="Liam Newman, Einar Lielmanis, et al.",
author_email="team@beautifier.io",
url="https://beautifier.io",
Expand Down
30 changes: 26 additions & 4 deletions python/setup-js.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
#!/usr/bin/env python
from pathlib import Path
import os
import 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."
),
long_description=Path("README.md").read_text(),
long_description_content_type="text/markdown",
author="Liam Newman, Einar Lielmanis, et al.",
author_email="team@beautifier.io",
url="https://beautifier.io",
Expand Down
Loading