Permalink
Browse files

setup, documentation, circleci, minor changes

  • Loading branch information...
sdpython committed May 17, 2018
1 parent b6f3072 commit 76e36713865e678979b9896b9a3e66b753ddb3f6
Showing with 8 additions and 58 deletions.
  1. +1 −1 .circleci/config.yml
  2. +2 −15 _doc/sphinxdoc/source/conf.py
  3. +2 −1 build_script.bat
  4. +3 −41 setup.py
@@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/python:3.6.4
- image: circleci/python:3.6.5
working_directory: ~/repo
@@ -1,24 +1,11 @@
# -*- coding: utf-8 -*-
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))
sys.path.insert(
0,
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..",
"..",
"..",
"pyquickhelper",
"src")))
import my_hachibee_sphinx_theme as hachibee_sphinx_theme
from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet
sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0])))
set_sphinx_variables(__file__, "Les enfants codaient", "Xavier Dupré", 2018,
"hachibee", hachibee_sphinx_theme.get_html_themes_path(),
@@ -5,7 +5,8 @@ set pythonexe="%1"
goto custom_python:
:default_value_python:
set pythonexe="c:\Python364_x64\python.exe"
set pythonexe="c:\Python365_x64\python.exe"
if not exist %pythonexe% 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:
@@ -53,36 +53,12 @@
############
def import_pyquickhelper():
try:
import pyquickhelper
except ImportError:
sys.path.append(
os.path.normpath(
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..",
"pyquickhelper",
"src"))))
try:
import pyquickhelper
except ImportError as e:
message = "Module pyquickhelper is needed to build the documentation ({0}), not found in path {1} - current {2}".format(
sys.executable,
sys.path[-1],
os.getcwd())
raise ImportError(message) from e
return pyquickhelper
def is_local():
if "moviepy-setup" in sys.argv:
return True
file = os.path.abspath(__file__).replace("\\", "/").lower()
if "/temp/" in file and "pip-" in file:
return False
import_pyquickhelper()
from pyquickhelper.pycode.setup_helper import available_commands_list
return available_commands_list(sys.argv)
@@ -106,7 +82,6 @@ def verbose():
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
return write_version_for_setup(__file__)
@@ -118,7 +93,7 @@ def write_version():
lines = f.readlines()
subversion = "." + lines[0].strip("\r\n ")
if subversion == ".0":
raise Exception("Subversion is wrong: '{0}'.".format(subversion))
raise Exception("Git version is wrong: '{0}'.".format(subversion))
else:
raise FileNotFoundError(
"Unable to find '{0}' argv={1}".format(versiontxt, sys.argv))
@@ -128,28 +103,19 @@ def write_version():
if "upload" in sys.argv and not subversion and not ask_help():
# avoid uploading with a wrong subversion number
try:
import pyquickhelper
pyq = True
except ImportError:
pyq = False
raise Exception(
"subversion is empty, cannot upload, is_local()={0}, pyquickhelper={1}".format(is_local(), pyq))
"Git version is empty, cannot upload, is_local()={0}".format(is_local()))
##############
# common part
##############
if os.path.exists(readme):
if sys.version_info[0] == 2:
from codecs import open
with open(readme, "r", encoding='utf-8-sig') as f:
long_description = f.read()
else:
long_description = ""
if os.path.exists(history):
if sys.version_info[0] == 2:
from codecs import open
with open(history, "r", encoding='utf-8-sig') as f:
long_description += f.read()
@@ -162,7 +128,7 @@ def write_version():
download()
r = True
else:
pyquickhelper = import_pyquickhelper()
import pyquickhelper
logging_function = pyquickhelper.get_fLOG()
from pyquickhelper.pycode import process_standard_options_for_setup
logging_function(OutputPrint=True)
@@ -185,17 +151,13 @@ def write_version():
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)

0 comments on commit 76e3671

Please sign in to comment.