Exemplo n.º 1
0
    def test_write_script(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        fold = os.path.abspath(os.path.dirname(__file__))
        data = os.path.join(fold, "data", "aREADME.rst")
        with open(data, "r", encoding="utf-8") as f:
            content = f.read()
        clean = clean_readme(content)
        exp = """
                README
                ======


                .. image:: https://travis-ci.org/sdpython/mlstatpy.svg?branch=master
                    :target: https://travis-ci.org/sdpython/mlstatpy
                    :alt: Build status

                .. image:: https://ci.appveyor.com/api/projects/status/5env33qptorgshaq?svg=true
                    :target: https://ci.appveyor.com/project/sdpython/mlstatpy
                    :alt: Build Status Windows

                .. image:: http://www.xavierdupre.fr/app/mlstatpy/helpsphinx/_images/nbcov.png
                    :target: http://www.xavierdupre.fr/app/mlstatpy/helpsphinx/all_notebooks_coverage.html
                    :alt: Notebook Coverage

                **Links:**

                * `GitHub/mlstatpy <https://github.com/sdpython/mlstatpy/>`_
                """.replace("                ", "").strip("\n ")
        self.assertEqual(clean.strip("\n "), exp)
Exemplo n.º 2
0
    def test_write_script(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        fold = os.path.abspath(os.path.dirname(__file__))
        data = os.path.join(fold, "data", "aREADME.rst")
        with open(data, "r", encoding="utf-8") as f:
            content = f.read()
        clean = clean_readme(content)
        exp = """
                README
                ======


                .. image:: https://travis-ci.com/sdpython/mlstatpy.svg?branch=master
                    :target: https://app.travis-ci.com/github/sdpython/mlstatpy
                    :alt: Build status

                .. image:: https://ci.appveyor.com/api/projects/status/5env33qptorgshaq?svg=true
                    :target: https://ci.appveyor.com/project/sdpython/mlstatpy
                    :alt: Build Status Windows

                .. image:: http://www.xavierdupre.fr/app/mlstatpy/helpsphinx/_images/nbcov.png
                    :target: http://www.xavierdupre.fr/app/mlstatpy/helpsphinx/all_notebooks_coverage.html
                    :alt: Notebook Coverage

                **Links:**

                * `GitHub/mlstatpy <https://github.com/sdpython/mlstatpy/>`_
                """.replace("                ", "").strip("\n ")
        self.assertEqual(clean.strip("\n "), exp)
Exemplo n.º 3
0
    from pyquickhelper.pycode import process_standard_options_for_setup_help
    process_standard_options_for_setup_help(sys.argv)

if not r:
    if len(sys.argv) in (1, 2) and sys.argv[-1] in ("--help-commands", ):
        from pyquickhelper.pycode import process_standard_options_for_setup_help
        process_standard_options_for_setup_help(sys.argv)
    root = os.path.abspath(os.path.dirname(__file__))
    if sys.platform.startswith("win"):
        extra_compile_args = None
    else:
        extra_compile_args = ['-std=c++11']

    from pyquickhelper.pycode import clean_readme
    from pandas_streaming import __version__ as sversion
    long_description = clean_readme(long_description)

    setup(
        name=project_var_name,
        version='%s%s' % (sversion, subversion),
        author='Xavier Dupré',
        author_email='*****@*****.**',
        license="MIT",
        url=
        "http://www.xavierdupre.fr/app/pandas_streaming/helpsphinx/index.html",
        download_url="https://github.com/sdpython/pandas_streaming/",
        description=DESCRIPTION,
        long_description=long_description,
        keywords=KEYWORDS,
        classifiers=CLASSIFIERS,
        packages=packages,
Exemplo n.º 4
0
                       "upload_docs", "bdist_wininst", "build_ext"} & set(sys.argv)):
        raise Exception("unable to interpret command line: " + str(sys.argv))
else:
    r = False

if ask_help():
    from pyquickhelper.pycode import process_standard_options_for_setup_help
    process_standard_options_for_setup_help(sys.argv)

if not r:
    if len(sys.argv) in (1, 2) and sys.argv[-1] in ("--help-commands",):
        from pyquickhelper.pycode import process_standard_options_for_setup_help
        process_standard_options_for_setup_help(sys.argv)
    from pyquickhelper.pycode import clean_readme
    from pymmails import __version__ as sversion
    long_description = clean_readme(long_description)

    setup(
        name=project_var_name,
        version='%s%s' % (sversion, subversion),
        author='Xavier Dupré',
        author_email='*****@*****.**',
        license="MIT",
        url="http://www.xavierdupre.fr/app/pymmails/helpsphinx/index.html",
        download_url="https://github.com/sdpython/pymmails/",
        description=DESCRIPTION,
        long_description=long_description,
        keywords=KEYWORDS,
        classifiers=CLASSIFIERS,
        packages=packages,
        package_dir=package_dir,
Exemplo n.º 5
0
else:
    r = False

if ask_help():
    from pyquickhelper.pycode import process_standard_options_for_setup_help
    process_standard_options_for_setup_help(sys.argv)

if not r:
    if len(sys.argv) in (1, 2) and sys.argv[-1] in ("--help-commands", ):
        from pyquickhelper.pycode import process_standard_options_for_setup_help
        process_standard_options_for_setup_help(sys.argv)
    try:
        from pyquickhelper.pycode import clean_readme
    except ImportError:
        clean_readme = None
    long_description = clean_readme(
        long_description) if clean_readme is not None else long_description
    from mlprodict import __version__ as sversion
    root = os.path.abspath(os.path.dirname(__file__))

    if sys.platform.startswith("win"):
        libraries_thread = ['kernel32']
        extra_compile_args = ['/EHsc', '/O2', '/Gy', '/openmp']
        extra_link_args = None
        define_macros = [('USE_OPENMP', None)]
    elif sys.platform.startswith("darwin"):
        libraries_thread = None
        extra_compile_args = [
            '-stdlib=libc++', '-mmacosx-version-min=10.7', '-fpermissive',
            '-std=c++11', '-Xpreprocessor', '-fopenmp'
        ]
        extra_link_args = ['-lomp']