Permalink
Browse files

setup requirements

  • Loading branch information...
sdpython committed Feb 24, 2018
1 parent f58d230 commit 60c1fa835d4d0008410280aabeb621a779972776
Showing with 37 additions and 77 deletions.
  1. +6 −2 .local.jenkins.win.yml
  2. +2 −22 requirements.txt
  3. +0 −7 requirements_conda.txt
  4. +29 −46 setup.py
@@ -1,16 +1,20 @@
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/ pyquickhelper pyensae pymmails pymyinstall pyrsslocal ensae_projects
- pip install -r requirements.txt
- pip freeze
- pip freeze > pip_freeze.txt
script:
- { CMD: "python -X faulthandler -X showrefcount -u setup.py unittests -g \".*noenv.*\"", NAME: "UT" }
- { CMD: "python -X faulthandler -X showrefcount -u setup.py unittests -g \".*((noenv)|(LONG)|(SKIP)).*\"", NAME: "UT" }
- { CMD: "python -u setup.py unittests -e \".*noenv1.*\" -g .*LONG.*", NAME: "UT_NOENV1" }
- { CMD: "python -u setup.py unittests -e \".*noenv2.*\"", NAME: "UT_NOENV2" }
- { CMD: "python -u setup.py unittests -e \".*noenv3.*\"", NAME: "UT_NOENV3" }
@@ -23,7 +27,7 @@ script:
- { CMD: "python -X faulthandler -X showrefcount -u setup.py unittests_LONG", NAME: "UT_LONG" }
- { CMD: "python -X faulthandler -X showrefcount -u setup.py unittests_SKIP", NAME: "UT_SKIP" }
after_script:
- python setup.py bdist_wheel
- python -u 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
documentation:
- if [ ${NAME} == "UT" ] then python -u setup.py build_sphinx fi
@@ -1,7 +1,3 @@
antlr4-python3-runtime
autopep8
babel!=2.0
blockdiag
coverage
ensae_projects
fastrlock
@@ -12,27 +8,11 @@ gizeh
hachibee_sphinx_theme
jyquickhelper
moviepy
mpld3
mutagen
opencv-python
pycodestyle>=2.0.0
pydocstyle
pyensae
pymmails
pymyinstall
pyquickhelper>=1.6.2369
pyquickhelper>=1.7.2438
pyshp
pytube!=9.0.4
qgrid
semantic_version
pytube>=9.0.6
shapely
sphinx-gallery
sphinxcontrib-images
sphinxcontrib-imagesvg
sphinxcontrib-jsdemo
sphinxjp.themes.basicstrap
sphinxjp.themes.sphinxjp
tqdm
tutormagic
unify
wheel
@@ -2,14 +2,8 @@ basemap
chainer
bokeh
Cython
ipython
jupyter
jupyter_client
jupyter_core
matplotlib
nbformat
nbpresent
notebook>=5.0.0
networkx
numpy>=1.11.0
pandas>=0.20.0
@@ -20,5 +14,4 @@ scipy
scikit-image
scikit-learn
seaborn
setuptools
Sphinx
@@ -27,12 +27,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 = {project_var_name + ".algorithm.data": ["*.txt"],
@@ -58,44 +56,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 \
"moviepy-setup" 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:
@@ -107,16 +88,15 @@ def import_pyquickhelper():
os.path.join(
os.path.dirname(__file__),
"..",
"pyquickhelper" if sys.version_info[
0] >= 3 else "py27_pyquickhelper_27",
"pyquickhelper",
"src"))))
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
@@ -134,9 +114,7 @@ def verbose():
##########
if is_local() and "--help" not in sys.argv and "--help-commands" not in sys.argv and \
'moviepy-setup' not in sys.argv:
if is_local() and not ask_help() and 'moviepy-setup' not in sys.argv:
def write_version():
pyquickhelper = import_pyquickhelper()
from pyquickhelper.pycode import write_version_for_setup
@@ -158,7 +136,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
@@ -216,6 +194,11 @@ 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()

0 comments on commit 60c1fa8

Please sign in to comment.