Skip to content
Permalink
Browse files

setup requirrements

  • Loading branch information...
sdpython committed Feb 24, 2018
1 parent 9e42219 commit 473e4be9791e243c3c14a0b7561fbe79ea88f7f9
Showing with 40 additions and 54 deletions.
  1. +5 −2 .local.jenkins.win.yml
  2. +2 −1 build_script.bat
  3. +1 −8 requirements.txt
  4. +32 −43 setup.py
@@ -1,9 +1,13 @@

language: python

python:
- { PATH: "{{replace(Python36, '\\', '\\\\')}}", VERSION: 3.6, DIST: std }
- { PATH: "{{replace(Anaconda3, '\\', '\\\\')}}", VERSION: 3.6, DIST: conda }

virtualenv:
- path: {{ospathjoin(root_path, pickname("%NAME_JENKINS%", project_name + "_%VERSION%_%DIST%_%NAME%"), "_venv")}}

install:
- pip install --no-cache-dir --no-deps --index http://localhost:8067/simple/ jyquickhelper --extra-index-url=https://pypi.python.org/simple/
- pip install --no-cache-dir --no-deps --index http://localhost:8067/simple/ pyquickhelper --extra-index-url=https://pypi.python.org/simple/
@@ -16,8 +20,7 @@ script:
- { CMD: "python -u setup.py unittests", NAME: "UT" }
after_script:
- python setup.py bdist_wheel
- if [ ${DIST} != "conda" and ${VERSION} == "3.6" and ${NAME} == "UT" ] then copy dist\*.whl {{root_path}}\..\..\local_pypi\local_pypi_server fi
- if [ ${DIST} != "conda" and ${VERSION} == "3.6" and ${NAME} == "UT" ] then copy dist\*.whl {{root_path}}\..\..\local_pypi\local_pypi_server fi
documentation:
- if [ ${NAME} == "UT" ] then python -u setup.py build_sphinx fi
- if [ ${NAME} == "UT" ] then xcopy /E /C /I /Y _doc\sphinxdoc\build\html dist\html fi

@@ -5,7 +5,8 @@ set pythonexe="%1"
goto custom_python:

:default_value_python:
set pythonexe="c:\Python363_x64\python.exe"
set pythonexe="c:\Python364_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python363_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python.exe"
:custom_python:
@echo [python] %pythonexe%
@@ -2,16 +2,9 @@ chardet
coverage
guzzle_sphinx_theme
jyquickhelper
openpyxl
pandas_streaming
pycodestyle>=2.0.0
pydocstyle
pyquickhelper>=1.5.2269
sphinx-bootstrap-theme
sphinx-gallery
pyquickhelper>=1.7.2438
sphinx-redactor-theme
sphinxcontrib-images
sphinxcontrib-imagesvg
sphinxjp.themes.basicstrap
sphinxjp.themes.sphinxjp
wheel
@@ -19,8 +19,6 @@

KEYWORDS = project_var_name + ', Xavier Dupré'
DESCRIPTION = """Look for insights about machine learned models"""


CLASSIFIERS = [
'Programming Language :: Python :: 3',
'Intended Audience :: Developers',
@@ -30,12 +28,10 @@
'Development Status :: 5 - Production/Stable'
]


#######
# data
#######


packages = find_packages('src', exclude='src')
package_dir = {k: "src/" + k.replace(".", "/") for k in packages}
package_data = {}
@@ -49,43 +45,27 @@ def is_local():
file = os.path.abspath(__file__).replace("\\", "/").lower()
if "/temp/" in file and "pip-" in file:
return False
if \
"bdist_msi" in sys.argv or \
"build27" in sys.argv or \
"build_script" in sys.argv or \
"build_sphinx" in sys.argv or \
"build_ext" in sys.argv or \
"bdist_wheel" in sys.argv or \
"bdist_wininst" in sys.argv or \
"clean_pyd" in sys.argv or \
"clean_space" in sys.argv or \
"copy27" in sys.argv or \
"copy_dist" in sys.argv or \
"local_pypi" in sys.argv or \
"notebook" in sys.argv or \
"publish" in sys.argv or \
"publish_doc" in sys.argv or \
"register" in sys.argv or \
"unittests" in sys.argv or \
"unittests_LONG" in sys.argv or \
"unittests_SKIP" in sys.argv or \
"unittests_GUI" in sys.argv or \
"run27" in sys.argv or \
"sdist" in sys.argv or \
"setupdep" in sys.argv or \
"test_local_pypi" in sys.argv or \
"upload_docs" in sys.argv or \
"setup_hook" in sys.argv or \
"copy_sphinx" in sys.argv or \
"write_version" in sys.argv:
try:
import_pyquickhelper()
except ImportError:
return False
return True
for cname in {"bdist_msi", "build27", "build_script", "build_sphinx", "build_ext",
"bdist_wheel", "bdist_egg", "bdist_wininst", "clean_pyd", "clean_space",
"copy27", "copy_dist", "local_pypi", "notebook", "publish", "publish_doc",
"register", "unittests", "unittests_LONG", "unittests_SKIP", "unittests_GUI",
"run27", "sdist", "setupdep", "test_local_pypi", "upload_docs", "setup_hook",
"copy_sphinx", "write_version"}:
if cname in sys.argv:
try:
import_pyquickhelper()
except ImportError:
return False
return True
else:
return False

return False


def ask_help():
return "--help" in sys.argv or "--help-commands" in sys.argv


def import_pyquickhelper():
try:
@@ -102,10 +82,10 @@ def import_pyquickhelper():
try:
import pyquickhelper
except ImportError as e:
message = "module pyquickhelper is needed to build the documentation ({0}), not found in path {1}".format(
message = "Module pyquickhelper is needed to build the documentation ({0}), not found in path {1} - current {2}".format(
sys.executable,
sys.path[
-1])
sys.path[-1],
os.getcwd())
raise ImportError(message) from e
return pyquickhelper

@@ -123,7 +103,7 @@ def verbose():
##########


if is_local() and "--help" not in sys.argv and "--help-commands" not in sys.argv:
if is_local() and not ask_help():
def write_version():
pyquickhelper = import_pyquickhelper()
from pyquickhelper.pycode import write_version_for_setup
@@ -145,7 +125,7 @@ def write_version():
# when the module is installed, no commit number is displayed
subversion = ""

if "upload" in sys.argv and not subversion:
if "upload" in sys.argv and not subversion and not ask_help():
# avoid uploading with a wrong subversion number
try:
import pyquickhelper
@@ -211,11 +191,20 @@ def write_version():
else:
r = False

if ask_help():
pyquickhelper = import_pyquickhelper()
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",):
pyquickhelper = import_pyquickhelper()
from pyquickhelper.pycode import process_standard_options_for_setup_help
process_standard_options_for_setup_help(sys.argv)
else:
pyquickhelper = import_pyquickhelper()
from pyquickhelper.pycode import clean_readme
long_description = clean_readme(long_description)
root = os.path.abspath(os.path.dirname(__file__))
if sys.platform.startswith("win"):
extra_compile_args = None

0 comments on commit 473e4be

Please sign in to comment.
You can’t perform that action at this time.