Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
add function create_folder_setup, documentation, API
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Jan 3, 2018
1 parent 3be9b7f commit 9c87bd1
Show file tree
Hide file tree
Showing 11 changed files with 390 additions and 35 deletions.
4 changes: 4 additions & 0 deletions _doc/sphinxdoc/source/API/distribution.rst
@@ -0,0 +1,4 @@
Distribution
============

.. autosignature:: pymyinstall.win_installer.win_setup_main.win_python_setup
4 changes: 4 additions & 0 deletions _doc/sphinxdoc/source/API/fix.rst
@@ -0,0 +1,4 @@
Fix
===

.. autosignature:: pymyinstall.fix.releases.fix_scipy10_for_statsmodels08
9 changes: 9 additions & 0 deletions _doc/sphinxdoc/source/API/index.rst
@@ -0,0 +1,9 @@
API
===

.. toctree::
:maxdepth: 2

fix
install
setup
122 changes: 122 additions & 0 deletions _doc/sphinxdoc/source/API/install.rst
@@ -0,0 +1,122 @@
Installation
============

.. contents::
:local:

Modules
+++++++

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.add_shortcut_to_desktop_for_module

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.create_virtual_env

.. autosignature:: pymyinstall.installhelper.module_install_version.get_module_dependencies

.. autosignature:: pymyinstall.installhelper.from .status_helper.get_installed_modules

.. autosignature:: pymyinstall.installhelper.module_install_version.get_module_metadata

.. autosignature:: pymyinstall.installhelper.module_install_version.get_module_version

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.get_pip_program

.. autosignature:: pymyinstall.installhelper.module_install_version.get_pypi_version

.. autosignature:: pymyinstall.installhelper.module_install_version.get_wheel_version

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.has_pip

.. autosignature:: pymyinstall.installhelper.module_install_version.is_installed

.. autosignature:: pymyinstall.installhelper.module_install_version.numeric_version

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.run_cmd

.. autosignature:: pymyinstall.installhelper.install_venv_helper.run_cmd_path

.. autosignature:: pymyinstall.installhelper.module_dependencies.missing_dependencies

.. autosignature:: pymyinstall.installhelper.module_install.ModuleInstall

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.run_venv_script

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.update_pip

.. autosignature:: pymyinstall.installhelper.install_cmd_helper.venv_install

.. autosignature:: pymyinstall.installhelper.module_install_version.version_consensus

.. autosignature:: pymyinstall.installhelper.module_install_version.compare_version

Install
+++++++

.. autosignature:: pymyinstall.packaged.packaged_config.classifiers2string

.. autosignature:: pymyinstall.packaged.automate_install.download_module

.. autosignature:: pymyinstall.packaged.automate_install.find_module_install

.. autosignature:: pymyinstall.packaged.packaged_config.get_package_set

.. autosignature:: pymyinstall.packaged.automate_install.install_module

.. autosignature:: pymyinstall.packaged.automate_install.install_module_deps

.. autosignature:: pymyinstall.packaged.automate_install.install_all

.. autosignature:: pymyinstall.packaged.config_helper.is_64bit

.. autosignature:: pymyinstall.packaged.packaged_config.name_sets_dataframe

.. autosignature:: pymyinstall.packaged.automate_install.update_all

.. autosignature:: pymyinstall.packaged.automate_install.update_module

Tools
+++++

.. autosignature:: pymyinstall.installcustom.install_custom.download_page

.. autosignature:: pymyinstall.installcustom.install_custom.download_page

.. autosignature:: pymyinstall.installcustom.install_custom_7z.install_7z

.. autosignature:: pymyinstall.installcustom.install_custom_chromedriver.install_chromedriver

.. autosignature:: pymyinstall.installcustom.install_custom_git.install_git

.. autosignature:: pymyinstall.installcustom.install_custom_graphviz.install_graphviz

.. autosignature:: pymyinstall.installcustom.install_custom_inkscape.install_inkscape

.. autosignature:: pymyinstall.installcustom.install_custom_javajdk.install_javajdk

.. autosignature:: pymyinstall.installcustom.install_custom_jenkins.install_jenkins

.. autosignature:: pymyinstall.installcustom.install_custom_julia.install_julia

.. autosignature:: pymyinstall.installcustom.install_custom_miktex.install_miktex

.. autosignature:: pymyinstall.installcustom.install_custom_mingw.install_mingw

.. autosignature:: pymyinstall.installcustom.install_custom_operadriver.install_operadriver

.. autosignature:: pymyinstall.installcustom.install_custom_pandoc.install_pandoc

.. autosignature:: pymyinstall.installcustom.install_custom_putty.install_putty

.. autosignature:: pymyinstall.installcustom.install_custom_python.install_python

.. autosignature:: pymyinstall.installcustom.install_custom_R.install_R

.. autosignature:: pymyinstall.installcustom.install_custom_scite.install_scite

.. autosignature:: pymyinstall.installcustom.install_custom_sqlitespy.install_sqlitespy

.. autosignature:: pymyinstall.installcustom.install_custom_sbt.install_scala_sbt

.. autosignature:: pymyinstall.installcustom.install_custom_scite.modify_scite_properties

.. autosignature:: pymyinstall.installcustom.install_custom.where_in_path
3 changes: 3 additions & 0 deletions _doc/sphinxdoc/source/blog/2017/2017-11-08_torch_windows.rst
Expand Up @@ -8,3 +8,6 @@
You can go there
`peterjc123/pytorch <https://anaconda.org/peterjc123/pytorch/files>`_
or type ``conda install -c peterjc123 pytorch``.
the setup can be created after unzipping the sources
and running example
:ref:`Create a setup from installed packages <ex-torch-setup>`.
11 changes: 5 additions & 6 deletions _doc/sphinxdoc/source/index.rst
Expand Up @@ -114,19 +114,18 @@ Installation

``pip install pymyinstall``

Quick start
-----------
Documentation
-------------

.. toctree::
:maxdepth: 1

API/index
i_ex
all_notebooks
i_faq
name_set_table
ensae_full_set_table
completed_todoextlist
issues_todoextlist

Galleries
---------
Expand All @@ -141,8 +140,8 @@ Galleries
gynotebooks/index
blog/blogindex

Index and License
-----------------
Index
-----

.. toctree::
:maxdepth: 1
Expand Down
69 changes: 69 additions & 0 deletions _unittests/ut_setup/test_setup_folder.py
@@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-
"""
@brief test log(time=25s)
"""

import sys
import os
import unittest

try:
import src
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..")))
if path not in sys.path:
sys.path.append(path)
import src

try:
import pyquickhelper as skip_
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..",
"..",
"pyquickhelper",
"src")))
if path not in sys.path:
sys.path.append(path)
if "PYQUICKHELPER" in os.environ and len(os.environ["PYQUICKHELPER"]) > 0:
sys.path.append(os.environ["PYQUICKHELPER"])
import pyquickhelper as skip_


from src.pymyinstall.setuphelper import create_folder_setup
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase


class TestSetupFolder(ExtTestCase):

def test_setup_folder(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")

temp = get_temp_folder(__file__, "temp_setup_folder", clean=False)

import pandas
self.assertTrue(pandas is not None)
st = create_folder_setup('pandas', fLOG=fLOG, output_path=temp)
self.assertEqual(len(st), 1)
self.assertExists(st[0])
exp = os.path.join(temp, 'dist')
found = os.listdir(exp)
self.assertEqual(len(found), 1)
self.assertIn(".whl", found[0])


if __name__ == "__main__":
unittest.main()
4 changes: 2 additions & 2 deletions src/pymyinstall/installhelper/__init__.py
Expand Up @@ -13,8 +13,8 @@

def module_as_table(list_module, as_df=False):
"""
returns a list of dictionaries or a dataframe
for a list of modules
Returns a list of dictionaries or a dataframe
for a list of modules.
@param list_module list of @see cl ModuleInstall
@param as_df as a dataframe or not
Expand Down
2 changes: 1 addition & 1 deletion src/pymyinstall/installhelper/run_cmd.py
Expand Up @@ -127,7 +127,7 @@ def run_cmd_private(cmd, sin="", shell=True, wait=False, log_error=True,
@return content of stdout, stdres (only if wait is True)
.. exref::
:title: Run a program using the command line)
:title: Run a program using the command line
::
Expand Down
2 changes: 1 addition & 1 deletion src/pymyinstall/setuphelper/__init__.py
Expand Up @@ -3,4 +3,4 @@
@brief Shortcut for ``setuphelper``
"""

from .setup_creation import create_empty_folder_setup
from .setup_creation import create_empty_folder_setup, create_folder_setup

0 comments on commit 9c87bd1

Please sign in to comment.