From 19c2d30657ef261cd80fb9f6fa0cc5cf132c28f3 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Mon, 11 May 2020 10:48:26 -0700 Subject: [PATCH] hgtools: Autospec creation for update from version 8.1.1 to version 8.2.0 Hugo (1): Fix AppVeyor typo Hugo van Kemenade (2): Spelling and capitalisation (#8) Link badge to PyPI rather than static image Jason R. Coombs (84): Disable the (broken) IPv6 in Travis. Ref travis-ci/travis-ci#8361. Don't match issues if preceeded by some other indicator. skip_upload_docs is default Drop the dot; http://blog.pytest.org/2016/whats-new-in-pytest-30/ Rely on declarative config to create long_description. Remove workaround for pyyaml 126. Revert "Remove workaround for pyyaml 126." We're getting close, but Python 3.7 still requires a workaround Use xenial to include support for Python 3.7. Remove release, no longer needed. Use twine instead. Also ignore W504 in flake8, following the indication in OCA/maintainer-quality-tools that neither W503 nor W504 are worthwhile in general. Release of pyyaml 3.13 seems to have fixed install issues on Python 3.7. Block pytest 3.7.3 due to pytest-dev/pytest#3888. Move most package config to declarative config Ignore pycodestyle warning. Seems it's not going to be fixed anytime soon. Also ignore flake8 error Require setuptools 34.4 to support python_requires in declarative config. Add workaround for Frozenball/pytest-sugar#159. Add black config, pre-commit including black, check code with black. Remove workaround for pytest-sugar 159, now fixed. Remove pytest-sugar plugin from standard pipelines as recommended in Frozenball/pytest-sugar#159. Prefer pytest-checkdocs to collective.checkdocs Suppress deprecation warning in docutils Remove use of setup_requires. Builders now require pip 10 or later to build/install from sdist. Older installers will still install the packages from wheels. Ref tox-dev/tox#809. Revert "Remove use of setup_requires. Builders now require pip 10 or later to build/install from sdist. Older installers will still install the packages from wheels. Ref tox-dev/tox#809." Indicate build backend of setuptools Add support for cutting releases without DPL and using pep517. Rely on pep517 0.5 Add documentation on the skeleton. Fixes #5. Add workaround for DeprecationWarning in flake8 Use consistent encoding quoting in pyproject.toml Clarify purpose of local/upstream extras Suppress E117 as workaround for PyCQA/pycodestyle#836 Amend skeleton documentation to expand on the value of the approach. Remove sudo declaration in Travis config. Enable tox-pip-extensions ext_venv_update if available. Fixes jaraco/skeleton#6 Rely on tox 3.2 and pip 10 or later for all builds It adds no value to add a pip requirement for the tox install Pin to pip 19.0 for now for pypa/pip#6434. Revert "Pin to pip 19.0 for now for pypa/pip#6434." Only install and invoke pytest-black on Python 3 Use pytest-black-multipy to enable simple support for pytest-black where available. Ref pytest-dev/pytest#5272. Update skeleton documentation to reflect black adoption. Rely on twine 1.13 or later Upgrade tox and virtualenv to ensure that environments get recent pips Define passenv in tox release section. Rely on __token__ for default username. Update docs to reflect changes to deployment. Python 3 only Enable coverage reporting on project Report the lines missing coverage Ensure that a late version of pip is installed without special versions of tox-venv. Disable tox-pip-version as it interacts badly with tox-venv causing tox to use the wrong Python version to install packages and run tests. Ref pglass/tox-pip-version#20 and tox-dev/tox-venv#40. Bring back tox-pip-version now that pglass/tox-pip-version#20 is fixed. Test/release on Python 3.8 Apply black to docs/conf.py Update black version and links Expect flake8 3.6 or later and remove suppression of warnings from Flake8 prior to 3.6. Rely on pytest-checkdocs 1.2.3, eliminating workaround for docutils warning. Remove workaround for gitlab.com/pycqa/flake8/issues/275, apparently no longer necessary. Normalize indentation Include keyring support from twine Rename 'build-docs' to simply 'docs' (matching more popular convention). Prefer 'path' to 'path.py' Cover Python 3.8 in Windows tests Update black in pre-commit and add blacken-docs. Test and release using Azure Pipelines Correct guidance on project creation. Rely on setuptools_scm 3.4 and setuptools 42. Now setup.py is optional. Remove setuptools from test environment. Finish dropping support for Python 2 (I hope). Normalize whitespace Revert "setup.cfg: let python-tag mirror python_requires" Update to bionic for Travis. Correct comment about IPv6 workaround. Suppress warnings in pytest-flake8, pytest-black, and pytest-checkdocs. Prefer pytest-black to pytest-black-multipy Test against Windows and Mac Define a default pool_vm_image Remove tox-venv and tox-pip-version. Tox-venv is discouraged (https://github.com/tox-dev/tox-venv/issues/48#issuecomment-620227405) and tox-pip-version was only there to support tox-venv. venv is dead; long live virtualenv. Remove more references to tox-venv Add workaround for warning emitted when junitxml is used. Ref pytest-dev/pytest#6178. Include mypy for type checking during tests. Fade to black Suppress type errors Add workaround for failing tests on Azure Pipelines. Update changelog. Sebastian Kriems (1): spaces, style and formatters (#4) Vincent Fazio (1): setup.cfg: let python-tag mirror python_requires johnthagen (1): Line wrap LICENSE file layday (1): Require toml extra for setuptools_scm (#12) --- Makefile | 2 +- buildreq_cache | 2 +- hgtools.spec | 199 ++++--------------------------------------------- options.conf | 5 +- release | 2 +- upstream | 2 +- versions | 2 +- 7 files changed, 22 insertions(+), 192 deletions(-) diff --git a/Makefile b/Makefile index 709afb7..c50d3a8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PKG_NAME := hgtools -URL = http://pypi.debian.net/hgtools/hgtools-8.1.1.tar.gz +URL = https://files.pythonhosted.org/packages/83/e8/fc576b4a1664d1f170a8251f2774dcad9d577a3cd631c9185b7ed3675159/hgtools-8.2.0.tar.gz ARCHIVES = include ../common/Makefile.common diff --git a/buildreq_cache b/buildreq_cache index a3a8ec0..2ebf2ff 100644 --- a/buildreq_cache +++ b/buildreq_cache @@ -1,3 +1,3 @@ -8.1.1 +8.2.0 setuptools setuptools_scm-python \ No newline at end of file diff --git a/hgtools.spec b/hgtools.spec index a0c6bd2..d1c1cea 100644 --- a/hgtools.spec +++ b/hgtools.spec @@ -3,10 +3,10 @@ # Generated by: autospec.py # Name : hgtools -Version : 8.1.1 -Release : 40 -URL : http://pypi.debian.net/hgtools/hgtools-8.1.1.tar.gz -Source0 : http://pypi.debian.net/hgtools/hgtools-8.1.1.tar.gz +Version : 8.2.0 +Release : 41 +URL : https://files.pythonhosted.org/packages/83/e8/fc576b4a1664d1f170a8251f2774dcad9d577a3cd631c9185b7ed3675159/hgtools-8.2.0.tar.gz +Source0 : https://files.pythonhosted.org/packages/83/e8/fc576b4a1664d1f170a8251f2774dcad9d577a3cd631c9185b7ed3675159/hgtools-8.2.0.tar.gz Summary : Classes and setuptools plugin for Mercurial and Git repositories Group : Development/Tools License : MIT @@ -24,181 +24,9 @@ BuildRequires : virtualenv %description .. image:: https://img.shields.io/pypi/v/hgtools.svg - :target: https://pypi.org/project/hgtools - +:target: `PyPI link`_ .. image:: https://img.shields.io/pypi/pyversions/hgtools.svg - -.. image:: https://img.shields.io/pypi/dm/hgtools.svg - -.. .. image:: https://img.shields.io/appveyor/ci/jaraco/skeleton/master.svg -.. :target: https://ci.appveyor.com/project/jaraco/skeleton/branch/master - -.. image:: https://img.shields.io/travis/jaraco/hgtools/master.svg - :target: https://travis-ci.org/jaraco/hgtools - -.. warning:: hgtools is defunct. It has been largely superseded by the - `setuptools_scm `_ - project. - -Usage -===== - -hgtools builds on the setuptools_hg plugin for setuptools. hgtools -provides classes for inspecting and working with repositories in the -Mercurial and Git version control systems (VCS). - -hgtools provides a plugin for setuptools that enables setuptools to find -files managed by the VCS (currently only Mercurial support is implemented). - -The classes provided by hgtools are designed to use subprocess invocation to -leverage the command-line interfaces of the VCS tools ``hg`` and ``git``. An -in-process RepoManager for Mercurial exists but has been disabled due to -issues that arise when run in certain environments (namely setuptools -sandboxing). - -.. note:: The setuptools feature - - You can read about the setuptools plugin provided by hgtools in the - `setuptools documentation`_. It basically returns a list of files that are - under VCS when running the ``setup`` function, e.g. if - you create a source and binary distribution. It's a simple yet effective way - of not having to define package data (non-Python files) manually in MANIFEST - templates (``MANIFEST.in``). - -.. _setuptools documentation: http://pythonhosted.org/setuptools/setuptools.html#adding-support-for-other-revision-control-systems - -Usage -***** - -Here's a simple example of a setup.py that uses hgtools: - -.. code-block:: python - - from setuptools import setup, find_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_packages(), - setup_requires=["hgtools"], - ) - -If you run the setup.py above, setuptools will automatically download -hgtools to the directory where the setup.py is located at (and won't -install it anywhere else) to get all package data files from the -sourec code repository. - -You should not need to, and I recommend you don't, install hgtools in -your site-packages directory. Let setuptools grab it on demand. Also, -try not to specify an upper bound for the requirement. Usually, simply -specifying 'hgtools' will get the latest version, which is likely to -remain compatible (as a plugin) for the life of the project. Specifying -an upper bound (i.e. `hgtools<1.1`) will only prevent you from getting -bug fixes. Only specify an upper bound if you require support for older -versions of Python. - -Auto Version Numbering -********************** - -With the 0.4 release, hgtools adds support for automatically generating -project version numbers from the repository in which the -project is developed. - -To use this feature, your project must follow the following assumptions: - - - Repo tags are used to indicate released versions. - - Tag names are specified as the version only (i.e. 0.1 and not - v0.1 or release-0.1) - - Released versions currently must conform to the StrictVersion in - distutils. Any tags that don't match this scheme will be ignored. - Future releases may relax this restriction. - -Thereafter, you may use the RepoManager.get_current_version to -determine the version of your product. If the current revision is tagged -with a valid version, that version will be used. Otherwise, the tags in -the repo will be searched, the latest release will be found, and hgtools -will infer the upcoming release version. - -For example, if the repo contains the tags 0.1, 0.2, and 0.3 and the -repo is not on any of those tags, get_current_version will return -'0.3.1dev' and get_current_version(increment='0.1') will return -'0.4dev'. - -A distutils hook has been created to hack setuptools to use this version -information automatically. To use this functionality, just use the -``use_vcs_version`` parameter to setup. -For example: - -.. code-block:: python - - from setuptools import setup, find_packages - setup( - name="HelloWorld", - use_vcs_version=True, - packages=find_packages(), - setup_requires=["hgtools"], - ) - -If the value supplied to use_vcs_version resolves to True, hgtools will -use the tagged version to determine the version of the -package (based on get_current_version). If an sdist is created, hgtools -will store the calculated version in the tag_build of the setup.cfg and -will use that version when deploying remotely. Therefore, if you are -using auto-versioning, you should not use setuptools tags explicitly. - -See the jaraco.util setup.py for an example of this technique. - -Versioning Parameters -~~~~~~~~~~~~~~~~~~~~~ - -It's also possible to pass keyword parameters to use_vcs_version to -tweak how it generates version numbers. To pass parameters, instead of -setting `use_vcs_version = True`, set it to a non-empty dictionary with -one or more of the following parameters: - - - `increment`: - A string indicating the default version increment for the project. - By default, this value is '0.1', meaning hgtools will use the version - '1.1dev' for builds following the 1.0 release and '1.10dev' for builds - following a 1.9.3 release. Set this value to '1.0' or '0.0.1' for the - current tree to help hgtools guess the target version. - - - `version_handler`: - A Python function with the following signature: - - .. code-block:: python - - def calc_version(mgr, options): - return str('1.0') - - hgtools will use this function instead of its default implementation - to customize the version number calculation. The `mgr` object is the - `hgtools.managers.base.RepoManager` object referencing the local repo - and the `options` is the dictionary passed to use_vcs_version. - - Use this option, for example, to include the commit hash or local - revision ID in the version: - - .. code-block:: python - - def id_as_version(mgr, options): - "Always return the Mercurial revision ID as the version" - id_n = mgr._invoke(['id', '-n']).strip() - return id_n - - setup( - #... - use_vcs_version={'version_handler': id_as_version}, - ) - - The first thing to note is the mgr does not yet provide a nice - interface for getting anything but the tags for a revision, so the - example digs into the underlying API to extract the ID. hgtools should - provide better support in the HGRepoManager classes in future releases. - - Use this feature with caution. If you have not already read the - `setuptools documentation on specifying a project version - `_, - the author recommends you do read that. +:target: `PyPI link`_ %package license Summary: license components for the hgtools package. @@ -228,20 +56,19 @@ python3 components for the hgtools package. %prep -%setup -q -n hgtools-8.1.1 -cd %{_builddir}/hgtools-8.1.1 +%setup -q -n hgtools-8.2.0 +cd %{_builddir}/hgtools-8.2.0 %build export http_proxy=http://127.0.0.1:9/ export https_proxy=http://127.0.0.1:9/ export no_proxy=localhost,127.0.0.1,0.0.0.0 export LANG=C.UTF-8 -export SOURCE_DATE_EPOCH=1582934835 -# -Werror is for werrorists +export SOURCE_DATE_EPOCH=1589219297 export GCC_IGNORE_WERROR=1 export CFLAGS="$CFLAGS -fno-lto " -export FCFLAGS="$CFLAGS -fno-lto " -export FFLAGS="$CFLAGS -fno-lto " +export FCFLAGS="$FFLAGS -fno-lto " +export FFLAGS="$FFLAGS -fno-lto " export CXXFLAGS="$CXXFLAGS -fno-lto " export MAKEFLAGS=%{?_smp_mflags} python3 setup.py build @@ -250,7 +77,7 @@ python3 setup.py build export MAKEFLAGS=%{?_smp_mflags} rm -rf %{buildroot} mkdir -p %{buildroot}/usr/share/package-licenses/hgtools -cp %{_builddir}/hgtools-8.1.1/LICENSE %{buildroot}/usr/share/package-licenses/hgtools/a1474494d96f6ddb3a9a0d767a09871ffc388faf +cp %{_builddir}/hgtools-8.2.0/LICENSE %{buildroot}/usr/share/package-licenses/hgtools/8e6689d37f82d5617b7f7f7232c94024d41066d1 python3 -tt setup.py build install --root=%{buildroot} echo ----[ mark ]---- cat %{buildroot}/usr/lib/python3*/site-packages/*/requires.txt || : @@ -261,7 +88,7 @@ echo ----[ mark ]---- %files license %defattr(0644,root,root,0755) -/usr/share/package-licenses/hgtools/a1474494d96f6ddb3a9a0d767a09871ffc388faf +/usr/share/package-licenses/hgtools/8e6689d37f82d5617b7f7f7232c94024d41066d1 %files python %defattr(-,root,root,-) diff --git a/options.conf b/options.conf index dc82640..03d45ea 100644 --- a/options.conf +++ b/options.conf @@ -1,9 +1,10 @@ [package] name = hgtools -url = http://pypi.debian.net/hgtools/hgtools-8.1.1.tar.gz +url = https://files.pythonhosted.org/packages/83/e8/fc576b4a1664d1f170a8251f2774dcad9d577a3cd631c9185b7ed3675159/hgtools-8.2.0.tar.gz archives = giturl = https://github.com/jaraco/hgtools.git domain = +alias = [autospec] # build 32 bit libraries @@ -38,6 +39,8 @@ no_autostart = false nodebug = false # disable stripping binaries nostrip = false +# configure build also for openmpi +openmpi = false # optimize build for size over speed optimize_size = false # set profile for pgo diff --git a/release b/release index 425151f..87523dd 100644 --- a/release +++ b/release @@ -1 +1 @@ -40 +41 diff --git a/upstream b/upstream index f85a90e..4b5de17 100644 --- a/upstream +++ b/upstream @@ -1 +1 @@ -7bc1107b0a7e946a1f830cb051108ab32aa0f4e5/hgtools-8.1.1.tar.gz +3e2f02fb77799ee901956fb784526705dea1aaf4/hgtools-8.2.0.tar.gz diff --git a/versions b/versions index 0e79152..fbb9ea1 100644 --- a/versions +++ b/versions @@ -1 +1 @@ -8.1.1 +8.2.0