from distutils.core import setup try: from setuptools import setup except: pass from _version import get_version, version_file version = get_version() setup( name = "pyjaco", version = version, author = "Pyjaco development team", author_email = "*****@*****.**", description = ("Python to JavaScript translator"), scripts = ["pyjs.py"], url = "http://pyjaco.org", keywords = "python javascript translator compiler", packages=["pyjaco", "pyjaco.compiler"], package_data={"pyjaco": ["stdlib/*.js"]}, data_files = [("pyjaco", [version_file, "_version.py"])], )
import pyjaco.compiler.python import pyjaco.compiler.javascript import pyjaco.compiler.multiplexer import re import StringIO import ast import inspect import imp try: from _version import get_version, parse_version except ImportError: from .._version import get_version, parse_version __version__ = get_version() __version_info__ = parse_version(__version__) def compile_string(script, jsvars = None): """Compile a python expression into javascript""" comp = Compiler(jsvars) comp.append_string(script) return str(comp) class Compiler(object): """ pyjaco. A python-to-javascript compiler Usage: c = Compiler()
# The master toctree document. master_doc = 'index' # General information about the project. project = 'dqc' author = 'Muhammad Firmansyah Kasim' copyright = '2021, %s' % author # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. from _version import get_version # The full version, including alpha/beta/rc tags. release = get_version() # short version version = ".".join(release.split(".")[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']