Skip to content
Permalink
Browse files

update setup.py and requirements

  • Loading branch information...
sdpython committed Feb 23, 2018
1 parent 11eb1dc commit 726d06d7107e2c411722e71966f090cb6de81c59
Showing with 31 additions and 83 deletions.
  1. +2 −43 requirements.txt
  2. +29 −40 setup.py
@@ -1,46 +1,5 @@
autopep8
babel!=2.0
bokeh
coverage
docformatter
ipython>=5.0.0
jupyter
jupyter-client
jupyter_sphinx
jyquickhelper
keyring
Mako
matplotlib
mistune
nbconvert>=5.0.0
nbformat
nbpresent
nbsphinx
notebook>=5.0.0
numpy>=1.11.1
openpyxl
pandas>=0.20.0
pandocfilters
pillow
pycodestyle>=2.0.0
pycryptodomex
pydocstyle
pyflakes
pylzma
pyquickhelper>=1.5.2215
python-jenkins
PyYAML
semantic_version
setuptools
Sphinx
sphinx-better-theme
sphinx-gallery
sphinx-rtd-theme
sphinxcontrib-images
sphinxcontrib-imagesvg
sphinxcontrib-jsdemo
sphinxjp.themes.sphinxjp
tqdm
unify
virtualenv
pyquickhelper>=1.7
solar-theme
wheel
@@ -47,43 +47,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:
@@ -101,10 +85,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

@@ -122,7 +106,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
@@ -144,7 +128,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
@@ -177,8 +161,8 @@ def write_version():
if is_local():
pyquickhelper = import_pyquickhelper()
logging_function = pyquickhelper.get_fLOG()
from pyquickhelper.pycode import process_standard_options_for_setup
logging_function(OutputPrint=True)
from pyquickhelper.pycode import process_standard_options_for_setup
r = process_standard_options_for_setup(
sys.argv, __file__, project_var_name,
requirements=["pyquickhelper", "jyquickhelper"],
@@ -192,6 +176,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 726d06d

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