diff --git a/.authors.yml b/.authors.yml index a134c254..48160038 100644 --- a/.authors.yml +++ b/.authors.yml @@ -48,3 +48,38 @@ num_commits: 1 first_commit: 2021-03-14 08:41:18 github: seemethere +- name: Daniel Bast + email: 2790401+dbast@users.noreply.github.com + num_commits: 2 + first_commit: 2021-04-12 11:49:45 +- name: conda-bot + email: ad-team+condabot@anaconda.com + num_commits: 2 + first_commit: 2022-01-25 21:32:39 +- name: Cheng H. Lee + email: clee@anaconda.com + alternate_emails: + - chenghlee@users.noreply.github.com + num_commits: 4 + first_commit: 2022-02-09 18:08:33 +- name: Chris Burr + email: chrisburr@users.noreply.github.com + num_commits: 1 + first_commit: 2022-02-17 10:23:53 +- name: Daniel Holth + email: dholth@anaconda.com + num_commits: 2 + first_commit: 2021-08-20 21:11:50 + github: dholth +- name: vz-x + email: 77290357+vz-x@users.noreply.github.com + num_commits: 1 + first_commit: 2022-02-17 11:31:22 +- name: Christopher Barber + email: christopher.barber@analog.com + num_commits: 2 + first_commit: 2022-02-09 01:00:38 +- name: Jannis Leidel + email: jannis@leidel.info + num_commits: 5 + first_commit: 2021-09-17 21:51:27 diff --git a/.mailmap b/.mailmap index 337e7082..5f6488d2 100644 --- a/.mailmap +++ b/.mailmap @@ -14,8 +14,16 @@ Michael Sarahan Mike Sarahan Ray Donnelly leej3 Jonathan J. Helmus +Jannis Leidel Nehal J Wani Alan Du +Cheng H. Lee Cheng H. Lee Matthew R. Becker +Daniel Bast <2790401+dbast@users.noreply.github.com> +conda-bot +Daniel Holth +Christopher Barber ossdev07 Eli Uriegas +Chris Burr +vz-x <77290357+vz-x@users.noreply.github.com> diff --git a/AUTHORS.txt b/AUTHORS.rst similarity index 69% rename from AUTHORS.txt rename to AUTHORS.rst index 846ec4b6..1eb91441 100644 --- a/AUTHORS.txt +++ b/AUTHORS.rst @@ -5,8 +5,16 @@ Authors are sorted by number of commits. * Ray Donnelly * leej3 * Jonathan J. Helmus +* Jannis Leidel * Nehal J Wani * Alan Du +* Cheng H. Lee * Matthew R. Becker +* Daniel Bast +* conda-bot +* Daniel Holth +* Christopher Barber * ossdev07 * Eli Uriegas +* Chris Burr +* vz-x diff --git a/CHANGELOG.md b/CHANGELOG.rst similarity index 81% rename from CHANGELOG.md rename to CHANGELOG.rst index d9f85a87..1d0b97a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.rst @@ -1,6 +1,51 @@ -# current developments +.. current developments + +2022-03-12 1.8.0: +================== + +Enhancements: +------------- + +* Compute package hashes in threads. (#83) + +Bug fixes: +---------- + +* Fix running from a read-only working directory (#44) +* Fix symlinks to directories being incorrectly placed in the ``info`` tarball + when transmuting ``.tar.bz2``- to ``.conda``-format packages (#84) +* No longer generate emtpy metadata.json in v2 packages (#88) +* Fix for TypeError in tarball.py. (#86) + +Deprecations: +------------- + +* Remove Python 2 support. + +Other: +------ + +* Added project board, issue staleness, thread locking and label automation + using GitHub action workflows to improve maintenance of GitHub project. + + More information can be found in the infra repo: https://github.com/conda/infra + +* Removed unused continuous integration platform config files. + +Contributors: +------------- + +* @dholth +* @conda-bot +* @chenghlee +* @analog-cbarber +* @chrisburr +* @vz-x +* @jezdez + + 2021-04-12 1.7.3: ------------------- +================== Enhancements: ------------- @@ -28,7 +73,7 @@ Contributors: 2020-10-16 1.7.2: ------------------- +================== Enhancements: ------------- @@ -49,7 +94,7 @@ Contributors: * @nehaljwani 2019-09-20 1.6.0: ------------------- +================== Enhancements: ------------- @@ -71,7 +116,7 @@ Contributors: 2019-08-31 1.5.0: ------------------- +================== Contributors: ------------- @@ -81,7 +126,7 @@ Contributors: 2019-08-04 1.4.1: ------------------- +================== Enhancements: ------------- @@ -95,7 +140,7 @@ Contributors: 2019-08-02 1.4.0: ------------------- +================== Bug fixes: ---------- @@ -110,7 +155,7 @@ Contributors: 2019-07-11 1.3.11: ------------------- +================== Bug fixes: ---------- @@ -124,7 +169,7 @@ Contributors: 2019-06-24 1.3.10: ------------------- +================== Contributors: ------------- @@ -133,7 +178,7 @@ Contributors: 2019-06-14 1.3.9: ------------------- +================== Bug fixes: ---------- @@ -147,7 +192,7 @@ Contributors: 2019-06-13 1.3.8: ------------------- +================== Bug fixes: ---------- @@ -161,7 +206,7 @@ Contributors: 2019-06-12 1.3.7: ------------------- +================== Bug fixes: ---------- @@ -175,7 +220,7 @@ Contributors: 2019-06-12 1.3.6: ------------------- +================== Contributors: ------------- @@ -183,7 +228,7 @@ Contributors: 2019-06-12 1.3.5: ------------------- +================== Bug fixes: ---------- @@ -197,7 +242,7 @@ Contributors: 2019-06-11 1.3.4: ------------------- +================== Bug fixes: ---------- @@ -212,7 +257,7 @@ Contributors: 2019-06-11 1.3.3: ------------------- +================== Bug fixes: ---------- @@ -226,7 +271,7 @@ Contributors: 2019-06-11 1.3.2: ------------------- +================== Bug fixes: ---------- @@ -240,7 +285,7 @@ Contributors: 2019-06-11 1.3.1: ------------------- +================== Bug fixes: ---------- @@ -254,7 +299,7 @@ Contributors: 2019-06-10 1.3.0: ------------------- +================== Enhancements: ------------- @@ -268,7 +313,7 @@ Contributors: 2019-06-08 1.2.0: ------------------- +================== Enhancements: ------------- @@ -283,7 +328,7 @@ Contributors: 2019-05-21 1.1.5: ------------------- +================== Bug fixes: ---------- @@ -297,7 +342,7 @@ Contributors: 2019-05-21 1.1.4: ------------------- +================== Enhancements: ------------- @@ -311,7 +356,7 @@ Contributors: 2019-05-20 1.1.3: ------------------- +================== Bug fixes: ---------- @@ -325,7 +370,7 @@ Contributors: 2019-05-20 1.1.2: ------------------- +================== Bug fixes: ---------- @@ -339,7 +384,7 @@ Contributors: 2019-05-14 1.1.1: ------------------- +================== Bug fixes: ---------- @@ -353,7 +398,7 @@ Contributors: 2019-05-10 1.1.0: ------------------- +================== Bug fixes: ---------- @@ -371,7 +416,7 @@ Contributors: 2019-02-13 1.0.4: ------------------- +================== Enhancements: ------------- @@ -386,7 +431,7 @@ Contributors: 2019-02-04 1.0.3: ------------------- +================== Bug fixes: ---------- @@ -400,7 +445,7 @@ Contributors: 2019-02-04 1.0.2: ------------------- +================== Contributors: ------------- @@ -409,14 +454,7 @@ Contributors: 2019-02-04 1.0.1: ------------------- +================== Contributors: ------------- - - - - -## 1.0.0 - -Initial release diff --git a/MANIFEST.in b/MANIFEST.in index 1f9a8cd4..57f96466 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ global-exclude tests/* +include AUTHORS.rst CHANGELOG.rst include versioneer.py include src/conda_package_handling/_version.py diff --git a/conda.recipe/conda_build_config.yaml b/conda.recipe/conda_build_config.yaml deleted file mode 100644 index 60a948c0..00000000 --- a/conda.recipe/conda_build_config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# The default AppVeyor VM image includes Visual Studio 2008 and 2015 but not 2017 -# Rather than using a different image, use VS2015 for non-Python 2.7 builds -c_compiler: # [win and not py27] - - vs2015 # [win and not py27] diff --git a/news/fix-44.rst b/news/fix-44.rst deleted file mode 100644 index 0e0e612f..00000000 --- a/news/fix-44.rst +++ /dev/null @@ -1,24 +0,0 @@ -Enhancements: -------------- - -* - -Bug fixes: ----------- - -* Fix running from a read-only working directory (#44) - -Deprecations: -------------- - -* - -Docs: ------ - -* - -Other: ------- - -* diff --git a/news/fix-conda-transmute-dir-symlinks.rst b/news/fix-conda-transmute-dir-symlinks.rst deleted file mode 100644 index 611f2c7b..00000000 --- a/news/fix-conda-transmute-dir-symlinks.rst +++ /dev/null @@ -1,25 +0,0 @@ -Enhancements: -------------- - -* - -Bug fixes: ----------- - -* Fix symlinks to directories being incorrectly placed in the ``info`` tarball - when transmuting ``.tar.bz2``- to ``.conda``-format packages (#84) - -Deprecations: -------------- - -* - -Docs: ------ - -* - -Other: ------- - -* diff --git a/news/issue-88.rst b/news/issue-88.rst deleted file mode 100644 index 4a99352f..00000000 --- a/news/issue-88.rst +++ /dev/null @@ -1,5 +0,0 @@ -Bug fixes: ----------- - -* No longer generate emtpy metadata.json in v2 packages (#88) - diff --git a/news/remove-python2.rst b/news/remove-python2.rst deleted file mode 100644 index 39056c86..00000000 --- a/news/remove-python2.rst +++ /dev/null @@ -1,25 +0,0 @@ -Enhancements: -------------- - -* - -Bug fixes: ----------- - -* - -Deprecations: -------------- - -* Remove Python 2 support. - -Docs: ------ - -* - -Other: ------- - -* - diff --git a/rever.xsh b/rever.xsh index cf792cd0..349dc431 100644 --- a/rever.xsh +++ b/rever.xsh @@ -1,27 +1,28 @@ $ACTIVITIES = [ "authors", "changelog", - "tag", - "push_tag", - "ghrelease", - "conda_forge" - ] + # "tag", + # "push_tag", + # "ghrelease", + # "conda_forge" +] # # Basic settings # $PROJECT = $GITHUB_REPO = "conda-package-handling" $GITHUB_ORG = "conda" -$AUTHORS_FILENAME = "AUTHORS.txt" +$AUTHORS_FILENAME = "AUTHORS.rst" # # Changelog settings # -$CHANGELOG_FILENAME = "CHANGELOG.md" -$CHANGELOG_PATTERN = "# current developments" -$CHANGELOG_HEADER = """# current developments +$CHANGELOG_FILENAME = "CHANGELOG.rst" +$CHANGELOG_PATTERN = ".. current developments" +$CHANGELOG_HEADER = """.. current developments + $RELEASE_DATE $VERSION: ------------------- +================== """ $CHANGELOG_CATEGORIES = ( diff --git a/setup.py b/setup.py index 205f7f3c..069ac1ed 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,8 @@ }, keywords='conda-package-handling', classifiers=[ - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ] ) diff --git a/src/conda_package_handling/__init__.py b/src/conda_package_handling/__init__.py index 896bddb0..251da663 100644 --- a/src/conda_package_handling/__init__.py +++ b/src/conda_package_handling/__init__.py @@ -1,4 +1,2 @@ -from ._version import get_versions -__version__ = get_versions()['version'] -del get_versions - +from . import _version +__version__ = _version.get_versions()['version'] diff --git a/src/conda_package_handling/_version.py b/src/conda_package_handling/_version.py index 142124f0..90365a8f 100644 --- a/src/conda_package_handling/_version.py +++ b/src/conda_package_handling/_version.py @@ -6,7 +6,7 @@ # that just contains the computed version number. # This file is released into the public domain. Generated by -# versioneer-0.21 (https://github.com/python-versioneer/python-versioneer) +# versioneer-0.22 (https://github.com/python-versioneer/python-versioneer) """Git implementation of _version.py.""" @@ -16,6 +16,7 @@ import subprocess import sys from typing import Callable, Dict +import functools def get_keywords(): @@ -73,6 +74,14 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, """Call the given command(s).""" assert isinstance(commands, list) process = None + + popen_kwargs = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + for command in commands: try: dispcmd = str([command] + args) @@ -80,7 +89,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, process = subprocess.Popen([command] + args, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=(subprocess.PIPE if hide_stderr - else None)) + else None), **popen_kwargs) break except OSError: e = sys.exc_info()[1] @@ -228,10 +237,15 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): version string, meaning we're inside a checked out source tree. """ GITS = ["git"] - TAG_PREFIX_REGEX = "*" if sys.platform == "win32": GITS = ["git.cmd", "git.exe"] - TAG_PREFIX_REGEX = r"\*" + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True) @@ -240,12 +254,12 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): print("Directory %s not under git control" % root) raise NotThisMethod("'git rev-parse --git-dir' returned error") + MATCH_ARGS = ["--match", "%s*" % tag_prefix] if tag_prefix else [] + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] # if there isn't one, this yields HEX[-dirty] (no NUM) describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", - "--always", "--long", - "--match", - "%s%s" % (tag_prefix, TAG_PREFIX_REGEX)], + "--always", "--long", *MATCH_ARGS], cwd=root) # --long was added in git-1.5.5 if describe_out is None: diff --git a/versioneer.py b/versioneer.py index b4cd1d6c..a142bf53 100644 --- a/versioneer.py +++ b/versioneer.py @@ -1,5 +1,5 @@ -# Version: 0.21 +# Version: 0.22 """The Versioneer - like a rocketeer, but for versions. @@ -10,11 +10,11 @@ * https://github.com/python-versioneer/python-versioneer * Brian Warner * License: Public Domain -* Compatible with: Python 3.6, 3.7, 3.8, 3.9 and pypy3 +* Compatible with: Python 3.6, 3.7, 3.8, 3.9, 3.10 and pypy3 * [![Latest Version][pypi-image]][pypi-url] * [![Build Status][travis-image]][travis-url] -This is a tool for managing a recorded version number in distutils-based +This is a tool for managing a recorded version number in distutils/setuptools-based python projects. The goal is to remove the tedious and error-prone "update the embedded version string" step from your release process. Making a new release should be as easy as recording a new tag in your version-control @@ -288,6 +288,7 @@ import subprocess import sys from typing import Callable, Dict +import functools class VersioneerConfig: @@ -384,6 +385,14 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, """Call the given command(s).""" assert isinstance(commands, list) process = None + + popen_kwargs = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + for command in commands: try: dispcmd = str([command] + args) @@ -391,7 +400,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, process = subprocess.Popen([command] + args, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=(subprocess.PIPE if hide_stderr - else None)) + else None), **popen_kwargs) break except OSError: e = sys.exc_info()[1] @@ -422,7 +431,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, # that just contains the computed version number. # This file is released into the public domain. Generated by -# versioneer-0.21 (https://github.com/python-versioneer/python-versioneer) +# versioneer-0.22 (https://github.com/python-versioneer/python-versioneer) """Git implementation of _version.py.""" @@ -432,6 +441,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, import subprocess import sys from typing import Callable, Dict +import functools def get_keywords(): @@ -489,6 +499,14 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, """Call the given command(s).""" assert isinstance(commands, list) process = None + + popen_kwargs = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + for command in commands: try: dispcmd = str([command] + args) @@ -496,7 +514,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, process = subprocess.Popen([command] + args, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=(subprocess.PIPE if hide_stderr - else None)) + else None), **popen_kwargs) break except OSError: e = sys.exc_info()[1] @@ -644,10 +662,15 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): version string, meaning we're inside a checked out source tree. """ GITS = ["git"] - TAG_PREFIX_REGEX = "*" if sys.platform == "win32": GITS = ["git.cmd", "git.exe"] - TAG_PREFIX_REGEX = r"\*" + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True) @@ -656,12 +679,12 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): print("Directory %%s not under git control" %% root) raise NotThisMethod("'git rev-parse --git-dir' returned error") + MATCH_ARGS = ["--match", "%%s*" %% tag_prefix] if tag_prefix else [] + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] # if there isn't one, this yields HEX[-dirty] (no NUM) describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", - "--always", "--long", - "--match", - "%%s%%s" %% (tag_prefix, TAG_PREFIX_REGEX)], + "--always", "--long", *MATCH_ARGS], cwd=root) # --long was added in git-1.5.5 if describe_out is None: @@ -1162,10 +1185,15 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): version string, meaning we're inside a checked out source tree. """ GITS = ["git"] - TAG_PREFIX_REGEX = "*" if sys.platform == "win32": GITS = ["git.cmd", "git.exe"] - TAG_PREFIX_REGEX = r"\*" + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True) @@ -1174,12 +1202,12 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): print("Directory %s not under git control" % root) raise NotThisMethod("'git rev-parse --git-dir' returned error") + MATCH_ARGS = ["--match", "%s*" % tag_prefix] if tag_prefix else [] + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] # if there isn't one, this yields HEX[-dirty] (no NUM) describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", - "--always", "--long", - "--match", - "%s%s" % (tag_prefix, TAG_PREFIX_REGEX)], + "--always", "--long", *MATCH_ARGS], cwd=root) # --long was added in git-1.5.5 if describe_out is None: @@ -1344,7 +1372,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose): SHORT_VERSION_PY = """ -# This file was generated by 'versioneer.py' (0.21) from +# This file was generated by 'versioneer.py' (0.22) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. @@ -1748,7 +1776,10 @@ def get_cmdclass(cmdclass=None): cmds = {} if cmdclass is None else cmdclass.copy() # we add "version" to both distutils and setuptools - from distutils.core import Command + try: + from setuptools import Command + except ImportError: + from distutils.core import Command class cmd_version(Command): description = "report generated version string"