diff --git a/.gitignore b/.gitignore index d09b336..88bc3f6 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,8 @@ parts/ sdist/ var/ wheels/ +pip-wheel-metadata/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg @@ -43,6 +45,7 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache @@ -77,9 +80,20 @@ target/ # Jupyter Notebook .ipynb_checkpoints +# IPython +profile_default/ +ipython_config.py + # pyenv .python-version +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don’t work, or not +# install all needed dependencies. +#Pipfile.lock + # celery beat schedule file celerybeat-schedule @@ -107,6 +121,11 @@ venv.bak/ # mypy .mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ # VirtualEnv rules # Virtualenv @@ -238,6 +257,10 @@ flycheck_*.el # directory configuration .dir-locals.el +# network security +/network-security.data + + # Vim rules # Swap [._]*.s[a-v][a-z] @@ -268,6 +291,9 @@ tags .idea/**/dictionaries .idea/**/shelf +# Generated files +.idea/**/contentModel.xml + # Sensitive or high-churn files .idea/**/dataSources/ .idea/**/dataSources.ids @@ -281,6 +307,14 @@ tags .idea/**/gradle.xml .idea/**/libraries +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + # CMake cmake-build-*/ @@ -311,6 +345,9 @@ fabric.properties # Editor-based Rest Client .idea/httpRequests +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + # SublimeText rules # Cache files for Sublime Text *.tmlanguage.cache @@ -390,7 +427,6 @@ DerivedData/ !default.perspectivev3 # Eclipse rules - .metadata bin/ tmp/ diff --git a/.travis.yml b/.travis.yml index 8295c53..02c7b63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,45 @@ + sudo: false +dist: xenial language: python notifications: email: false python: - - pypy-5.3.1 - - 3.7-dev + - &pypy2 pypy2.7-6.0 + - &pypy3 pypy3.5-6.0 + - 3.8-dev + - 3.7 - 3.6 - 3.5 - - 3.4 - 2.7 + +stages: + - test + - lint + +.disable_global: &disable_global + before_install: false + install: true + before_script: false + after_success: false + after_failure: false + +.lint: &lint + <<: *disable_global + python: 3.6 + stage: lint + install: pip install flake8 + script: flake8 + +jobs: + include: + - *lint + +stage: test + +script: make test + before_install: - - if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi - if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then mv min_requirements.txt requirements.txt ; fi diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fa02a2d..139a0ed 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,14 @@ Change log ================================================================================ +0.0.4 - 04-05-2019 +-------------------------------------------------------------------------------- + +Updated +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. use pypi-mobans version 0.0.4 and 0.0.5 + 0.0.3 - 08-11-2018 -------------------------------------------------------------------------------- diff --git a/changelog.yml b/changelog.yml index 295efe1..b722ed9 100644 --- a/changelog.yml +++ b/changelog.yml @@ -1,6 +1,12 @@ name: "pypi-mobans" organisation: moremoban releases: +- changes: + - action: Updated + details: + - use pypi-mobans version 0.0.4 and 0.0.5 + date: 04-05-2019 + version: 0.0.4 - changes: - action: Updated details: diff --git a/docs/source/conf.py b/docs/source/conf.py index 2c4d199..902e958 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,15 +21,13 @@ # -- Project information ----------------------------------------------------- -project = '' -copyright = '' -author = 'Onni Software Ltd. and its contributors' - +project = 'pypi-mobans-pkg' +copyright = '2018-2019 Onni Software Ltd. and its contributors' +author = 'C.W.' # The short X.Y version -version = '0.0.2.1' +version = '0.0.4' # The full version, including alpha/beta/rc tags -release = '0.0.2.1' - +release = '0.0.4' # -- General configuration --------------------------------------------------- @@ -41,12 +39,6 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - # The master toctree document. master_doc = '' @@ -70,51 +62,16 @@ # html_theme = 'alabaster' -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# The default sidebars (for documents that don't match any pattern) are -# defined by theme itself. Builtin themes are using these templates by -# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', -# 'searchbox.html']``. -# -# html_sidebars = {} - - -# -- Options for Epub output ------------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = project - -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -# -# epub_identifier = '' - -# A unique identification for the text. -# -# epub_uid = '' - -# A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] - # -- Extension configuration ------------------------------------------------- # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} - # TODO: html_theme not configurable upstream html_theme = 'default' diff --git a/pypi-mobans-pkg.yml b/pypi-mobans-pkg.yml index 8d7d289..9bb94f1 100644 --- a/pypi-mobans-pkg.yml +++ b/pypi-mobans-pkg.yml @@ -3,9 +3,9 @@ organisation: "moremoban" author: "C.W." contact: "wangc_2011@hotmail.com" company: "Onni Software Ltd. and its contributors" -version: "0.0.3" -current_version: "0.0.3" -release: "0.0.3" +version: "0.0.4" +current_version: "0.0.4" +release: "0.0.4" copyright_year: 2018-2019 license: public license dependencies: diff --git a/pypi_mobans_pkg/_version.py b/pypi_mobans_pkg/_version.py index 8c6071d..b5e9002 100644 --- a/pypi_mobans_pkg/_version.py +++ b/pypi_mobans_pkg/_version.py @@ -1,2 +1,2 @@ -__version__ = "0.0.3" +__version__ = "0.0.4" __author__ = "C.W." diff --git a/pypi_mobans_pkg/resources b/pypi_mobans_pkg/resources index 2e82954..5948547 160000 --- a/pypi_mobans_pkg/resources +++ b/pypi_mobans_pkg/resources @@ -1 +1 @@ -Subproject commit 2e82954983e33ed8b81154347f5be93916e98321 +Subproject commit 59485471ba95dfde7f684aa9c783ff58468ac249 diff --git a/setup.py b/setup.py index ee966c0..c7a8324 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,15 @@ #!/usr/bin/env python3 # Template by pypi-mobans -import os -import sys import codecs import locale +import os +import platform +import sys from shutil import rmtree -from setuptools import Command, setup, find_packages +from setuptools import Command, find_packages, setup -from platform import python_implementation PY2 = sys.version_info[0] == 2 PY26 = PY2 and sys.version_info[1] < 7 PY33 = sys.version_info < (3, 4) @@ -22,54 +22,58 @@ try: lc = locale.getlocale() pf = platform.system() - if pf != 'Windows' and lc == (None, None): - locale.setlocale(locale.LC_ALL, 'C.UTF-8') + if pf != "Windows" and lc == (None, None): + locale.setlocale(locale.LC_ALL, "C.UTF-8") except (ValueError, UnicodeError, locale.Error): - locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') + locale.setlocale(locale.LC_ALL, "en_US.UTF-8") -NAME = 'pypi-mobans-pkg' -AUTHOR = 'C.W.' -VERSION = '0.0.3' -EMAIL = 'wangc_2011@hotmail.com' -LICENSE = 'public license' +NAME = "pypi-mobans-pkg" +AUTHOR = "C.W." +VERSION = "0.0.4" +EMAIL = "wangc_2011@hotmail.com" +LICENSE = "public license" DESCRIPTION = ( - 'Scaffolding mobans for your Python project.' + "Scaffolding mobans for your Python project." ) -URL = 'https://github.com/moremoban/pypi-mobans-pkg' -DOWNLOAD_URL = '%s/archive/0.0.3.tar.gz' % URL -FILES = ['README.rst', 'CHANGELOG.rst'] +URL = "https://github.com/moremoban/pypi-mobans-pkg" +DOWNLOAD_URL = "%s/archive/0.0.4.tar.gz" % URL +FILES = ["README.rst", "CHANGELOG.rst"] KEYWORDS = [ - 'python', + "python", ] CLASSIFIERS = [ - 'Topic :: Software Development :: Libraries', - 'Programming Language :: Python', - 'Intended Audience :: Developers', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', + "Topic :: Software Development :: Libraries", + "Programming Language :: Python", + "Intended Audience :: Developers", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + + "Programming Language :: Python :: 3.7", + + "Programming Language :: Python :: 3.8", + ] INSTALL_REQUIRES = [ - 'lml', + "lml", ] SETUP_COMMANDS = {} -PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests']) +PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"]) EXTRAS_REQUIRE = { } # You do not need to read beyond this line -PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format( - sys.executable) -GS_COMMAND = ('gs pypi-mobans-pkg v0.0.3 ' + - "Find 0.0.3 in changelog for more details") -NO_GS_MESSAGE = ('Automatic github release is disabled. ' + - 'Please install gease to enable it.') +PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable) +GS_COMMAND = ("gs pypi-mobans-pkg v0.0.4 " + + "Find 0.0.4 in changelog for more details") +NO_GS_MESSAGE = ("Automatic github release is disabled. " + + "Please install gease to enable it.") UPLOAD_FAILED_MSG = ( 'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND) HERE = os.path.abspath(os.path.dirname(__file__)) @@ -78,13 +82,13 @@ class PublishCommand(Command): """Support setup.py upload.""" - description = 'Build and publish the package on github and pypi' + description = "Build and publish the package on github and pypi" user_options = [] @staticmethod def status(s): """Prints things in bold.""" - print('\033[1m{0}\033[0m'.format(s)) + print("\033[1m{0}\033[0m".format(s)) def initialize_options(self): pass @@ -94,14 +98,14 @@ def finalize_options(self): def run(self): try: - self.status('Removing previous builds...') - rmtree(os.path.join(HERE, 'dist')) - rmtree(os.path.join(HERE, 'build')) - rmtree(os.path.join(HERE, 'pypi_mobans_pkg.egg-info')) + self.status("Removing previous builds...") + rmtree(os.path.join(HERE, "dist")) + rmtree(os.path.join(HERE, "build")) + rmtree(os.path.join(HERE, "pypi_mobans_pkg.egg-info")) except OSError: pass - self.status('Building Source and Wheel (universal) distribution...') + self.status("Building Source and Wheel (universal) distribution...") run_status = True if has_gease(): run_status = os.system(GS_COMMAND) == 0 @@ -115,7 +119,7 @@ def run(self): SETUP_COMMANDS.update({ - 'publish': PublishCommand + "publish": PublishCommand }) @@ -144,7 +148,7 @@ def read_files(*files): def read(afile): """Read a file into setup""" the_relative_file = os.path.join(HERE, afile) - with codecs.open(the_relative_file, 'r', 'utf-8') as opened_file: + with codecs.open(the_relative_file, "r", "utf-8") as opened_file: content = filter_out_test_code(opened_file) content = "".join(list(content)) return content @@ -153,11 +157,11 @@ def read(afile): def filter_out_test_code(file_handle): found_test_code = False for line in file_handle.readlines(): - if line.startswith('.. testcode:'): + if line.startswith(".. testcode:"): found_test_code = True continue if found_test_code is True: - if line.startswith(' '): + if line.startswith(" "): continue else: empty_line = line.strip() @@ -167,15 +171,16 @@ def filter_out_test_code(file_handle): found_test_code = False yield line else: - for keyword in ['|version|', '|today|']: + for keyword in ["|version|", "|today|"]: if keyword in line: break else: yield line -if __name__ == '__main__': +if __name__ == "__main__": setup( + test_suite="tests", name=NAME, author=AUTHOR, version=VERSION, @@ -187,7 +192,7 @@ def filter_out_test_code(file_handle): license=LICENSE, keywords=KEYWORDS, extras_require=EXTRAS_REQUIRE, - tests_require=['nose'], + tests_require=["nose"], install_requires=INSTALL_REQUIRES, packages=PACKAGES, include_package_data=True, diff --git a/test.sh b/test.sh index 7125a48..1d17e9c 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,2 @@ pip freeze -nosetests --with-coverage --cover-package pypi_mobans_pkg --cover-package tests tests docs/source pypi_mobans_pkg && flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long +nosetests --with-coverage --cover-package pypi_mobans_pkg --cover-package tests tests docs/source pypi_mobans_pkg