Skip to content

Commit

Permalink
Merge branch 'main' of github.com:conda/conda-build into content-hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Nov 26, 2024
2 parents d97d081 + 4260236 commit 36f23c3
Show file tree
Hide file tree
Showing 35 changed files with 226 additions and 259 deletions.
24 changes: 12 additions & 12 deletions .authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
email: jjhelmus@gmail.com
aliases:
- Jonathan Helmus
num_commits: 110
num_commits: 111
first_commit: 2014-06-09 17:25:05
github: jjhelmus
- name: Isuru Fernando
Expand Down Expand Up @@ -370,7 +370,7 @@
github: ClinicalGraphics
- name: John Blischak
email: jdblischak@gmail.com
num_commits: 11
num_commits: 12
first_commit: 2017-08-11 13:23:55
github: jdblischak
- name: Floris Bruynooghe
Expand Down Expand Up @@ -1121,7 +1121,7 @@
alternate_emails:
- becker.mr@gmail.com
- beckermr@users.noreply.github.com
num_commits: 22
num_commits: 27
first_commit: 2019-10-17 23:05:16
github: beckermr
- name: Jinzhe Zeng
Expand Down Expand Up @@ -1202,7 +1202,7 @@
alternate_emails:
- clee@anaconda.com
- name: Ken Odegard
num_commits: 220
num_commits: 228
email: kodegard@anaconda.com
first_commit: 2020-09-08 19:53:41
github: kenodegard
Expand All @@ -1225,7 +1225,7 @@
first_commit: 2020-11-19 10:46:41
- name: Jannis Leidel
email: jannis@leidel.info
num_commits: 32
num_commits: 34
github: jezdez
first_commit: 2020-11-19 10:46:41
- name: Christof Kaufmann
Expand All @@ -1240,7 +1240,7 @@
github: pre-commit-ci[bot]
aliases:
- pre-commit-ci[bot]
num_commits: 86
num_commits: 95
first_commit: 2021-11-20 01:47:17
- name: Jacob Walls
email: jacobtylerwalls@gmail.com
Expand All @@ -1251,7 +1251,7 @@
github: beeankha
alternate_emails:
- beeankha@gmail.com
num_commits: 43
num_commits: 40
first_commit: 2022-01-19 16:40:06
- name: Conda Bot
email: 18747875+conda-bot@users.noreply.github.com
Expand All @@ -1262,7 +1262,7 @@
alternate_emails:
- ad-team+condabot@anaconda.com
- 18747875+conda-bot@users.noreply.github.com
num_commits: 62
num_commits: 66
first_commit: 2022-01-17 18:09:22
- name: Uwe L. Korn
email: xhochy@users.noreply.github.com
Expand Down Expand Up @@ -1310,7 +1310,7 @@
- name: dependabot[bot]
email: 49699333+dependabot[bot]@users.noreply.github.com
github: dependabot[bot]
num_commits: 35
num_commits: 37
first_commit: 2022-05-31 04:34:40
- name: Serhii Kupriienko
email: 79282962+skupr-anaconda@users.noreply.github.com
Expand All @@ -1327,7 +1327,7 @@
- name: Jaime Rodríguez-Guerra
email: jaimergp@users.noreply.github.com
github: jaimergp
num_commits: 17
num_commits: 20
first_commit: 2022-11-02 19:34:51
- name: Dave Clements
email: tnabtaf@gmail.com
Expand Down Expand Up @@ -1376,7 +1376,7 @@
aliases:
- Ryan
github: ryanskeith
num_commits: 6
num_commits: 7
first_commit: 2023-03-22 03:11:02
- name: Rishabh Singh
email: 67859818+rishabh11336@users.noreply.github.com
Expand Down Expand Up @@ -1461,7 +1461,7 @@
github: timkpaine
- name: Klaus Zimmermann
email: klaus.zimmermann@quansight.com
num_commits: 2
num_commits: 3
first_commit: 2024-06-07 10:02:14
github: zklaus
- name: Daniel Ching
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check CLA
uses: conda/actions/check-cla@15f883f14f4232f83658e3609c3316d58905138f # v24.8.0
uses: conda/actions/check-cla@6e72e0db87e72f0020e493aeb02f864363bd9258 # v24.11.1
with:
# [required]
# A token with ability to comment, label, and modify the commit status
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
days-before-issue-stale: 90
days-before-issue-close: 21
steps:
- uses: conda/actions/read-yaml@15f883f14f4232f83658e3609c3316d58905138f # v24.8.0
- uses: conda/actions/read-yaml@6e72e0db87e72f0020e493aeb02f864363bd9258 # v24.11.1
id: read_yaml
with:
path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ jobs:
# to override the version with a derivative of the branch name
# override the version if `git describe --tag` does not start with the branch version
last_release = check_output(["git", "describe", "--tag"])
last_release = check_output(["git", "describe", "--tag"], text=True).strip()
prefix = "${{ github.ref_name }}"[:-1] # without x suffix
if not last_release.startswith(prefix):
envs["VERSION_OVERRIDE"] = "${{ github.ref_name }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
git config --global user.name 'Conda Bot'
git config --global user.email '18747875+conda-bot@users.noreply.github.com'
- uses: conda/actions/combine-durations@15f883f14f4232f83658e3609c3316d58905138f # v24.8.0
- uses: conda/actions/combine-durations@6e72e0db87e72f0020e493aeb02f864363bd9258 # v24.11.1
id: durations
continue-on-error: true

- uses: conda/actions/template-files@15f883f14f4232f83658e3609c3316d58905138f # v24.8.0
- uses: conda/actions/template-files@6e72e0db87e72f0020e493aeb02f864363bd9258 # v24.11.1
id: templates
continue-on-error: true

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ repos:
# auto format Python codes within docstrings
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.8.0
hooks:
# lint & attempt to correct failures (e.g. pyupgrade)
- id: ruff
Expand Down
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
[//]: # (current developments)

## 24.11.1 (2024-11-21)

### Bug fixes

* Fix `TypeError` when no CLI arguments are passed. (#5549 via #5550)

### Contributors

* @beeankha
* @kenodegard



## 24.11.0 (2024-11-15)

### Enhancements

* Introduce `--package-format` as a command line argument. (#4890 via #5209)
* This takes precedence over default value and `condarc`.
* Normalization occurs so `1`, `"1"`, `tar.bz2`,`.tar.bz2`, `2`, `"2"`, `conda`, `.conda` are all recognized and mapped appropriately.
* Other options are rejected.
* Add support for [CEP-17](https://github.com/conda/ceps/blob/main/cep-0017.md) that allows specifying the location of the site-packages directory with the `python_site_packages_path` build option for any packages named `python`. (#5502)

### Bug fixes

* Fix regex for Jinja2 `set` / `for` statements to be more specific. (#5514)
* Fix `ruamel.yaml` usage to use supported APIs. (#5517)
* Fix bug variant variables were not defined for the first parsing pass of a recipe. (#5528)
* Fix a bug where variants were incorrectly found as being used when they matched a leading substring of
another variant. (#5535)
* Fix a bug where variants were not found when variables were used in `pin_*` statements. (#5535)

### Deprecations

* Deprecate `conda_build.exceptions.UnableToParseMissingJinja2`. (#5497)
* Deprecate `conda_build.index.get_build_index(locking)`. (#5508)
* Deprecate `conda_build.index.get_build_index(timeout)`. (#5508)
* Require Python 3.9 or greater. (#5525)
* The default value for `--package-format` and `conda_pkg_format` will become `.conda` in 25.1. (#5534)

### Docs

* Better document `run_test.r`. (#5479)
* Fix bug in docs build by pinning `conda-sphinx-theme` version to 0.2.2. (#5518)

### Contributors

* @beeankha
* @conda-bot
* @jaimergp
* @jezdez
* @jdblischak
* @jjhelmus
* @kenodegard
* @zklaus
* @beckermr
* @ryanskeith
* @dependabot[bot]
* @pre-commit-ci[bot]



## 24.9.0 (2024-09-18)

### Enhancements
Expand Down
3 changes: 2 additions & 1 deletion conda_build/_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def create_script(fn):
shutil.copy2(src, dst + "-script.py")
FILES.append(f"Scripts/{fn}-script.py")
shutil.copy2(
join(THIS_DIR, "cli-%d.exe" % (8 * tuple.__itemsize__)), dst + ".exe"
join(THIS_DIR, "cli-%d.exe" % (8 * tuple.__itemsize__)), # noqa: UP031
dst + ".exe",
)
FILES.append(f"Scripts/{fn}.exe")
else:
Expand Down
4 changes: 2 additions & 2 deletions conda_build/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,14 @@ def inspect_prefix_length(packages, min_prefix_length=_prefix_length):
prefix_lengths = check_prefix_lengths(packages, config)
if prefix_lengths:
print(
"Packages with binary prefixes shorter than %d characters:"
"Packages with binary prefixes shorter than %d characters:" # noqa: UP031
% min_prefix_length
)
for fn, length in prefix_lengths.items():
print(f"{fn} ({length} chars)")
else:
print(
"No packages found with binary prefixes shorter than %d characters."
"No packages found with binary prefixes shorter than %d characters." # noqa: UP031
% min_prefix_length
)
return len(prefix_lengths) == 0
Expand Down
2 changes: 1 addition & 1 deletion conda_build/cli/main_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def parse_args(args: Sequence[str] | None) -> tuple[ArgumentParser, Namespace]:

# TODO: Remove in 25.1
if (
all(not arg.startswith("--package-format") for arg in args)
all(not arg.startswith("--package-format") for arg in (args or []))
and warn_about_default_pkg_format
and "purge" not in parsed.recipe
and "purge-all" not in parsed.recipe
Expand Down
26 changes: 21 additions & 5 deletions conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,10 @@ def parse(data, config, path=None):
"url": None,
"md5": str,
"sha1": None,
"sha224": None,
"sha256": None,
"sha384": None,
"sha512": None,
"content_md5": str,
"content_sha1": None,
"content_sha256": None,
Expand Down Expand Up @@ -1601,21 +1604,34 @@ def ms_depends(self, typ="run"):
try:
ms = MatchSpec(spec)
except AssertionError:
raise RuntimeError(f"Invalid package specification: {spec!r}")
if len(self.undefined_jinja_vars) == 0:
raise RuntimeError(f"Invalid package specification: {spec!r}")
else:
continue
except (AttributeError, ValueError) as e:
raise RuntimeError(
"Received dictionary as spec. Note that pip requirements are "
"not supported in conda-build meta.yaml. Error message: " + str(e)
)
if len(self.undefined_jinja_vars) == 0:
raise RuntimeError(
"Received dictionary as spec. Note that pip requirements are "
"not supported in conda-build meta.yaml. Error message: "
+ str(e)
)
else:
continue

if ms.name == self.name() and not (
typ == "build" and self.config.host_subdir != self.config.build_subdir
):
raise RuntimeError(f"{self.name()} cannot depend on itself")

# TODO: IDK what this does since AFAIK the inner continue applies only
# to the inner loop
for name, ver in name_ver_list:
if ms.name == name:
if self.noarch:
continue

# TODO: the validation here appears to be a waste of time since MatchSpec
# appears to validate?
for c in "=!@#$%^&*:;\"'\\|<>?/":
if c in ms.name:
sys.exit(
Expand Down
6 changes: 3 additions & 3 deletions conda_build/os_utils/macho.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def add_rpath(path, rpath, build_prefix=None, verbose=False):
else:
print(stderr, file=sys.stderr)
if code:
raise RuntimeError("install_name_tool failed with exit status %d" % code)
raise RuntimeError("install_name_tool failed with exit status %d" % code) # noqa: UP031


def delete_rpath(path, rpath, build_prefix=None, verbose=False):
Expand All @@ -312,7 +312,7 @@ def delete_rpath(path, rpath, build_prefix=None, verbose=False):
else:
print(stderr, file=sys.stderr)
if code:
raise RuntimeError("install_name_tool failed with exit status %d" % code)
raise RuntimeError("install_name_tool failed with exit status %d" % code) # noqa: UP031


def install_name_change(path, build_prefix, cb_func, dylibs, verbose=False):
Expand Down Expand Up @@ -348,7 +348,7 @@ def install_name_change(path, build_prefix, cb_func, dylibs, verbose=False):
print(stderr, file=sys.stderr)
if code:
raise RuntimeError(
"install_name_tool failed with exit status %d, stderr of:\n%s"
"install_name_tool failed with exit status %d, stderr of:\n%s" # noqa: UP031
% (code, stderr)
)
return ret
Expand Down
4 changes: 2 additions & 2 deletions conda_build/os_utils/pyldd.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ def __init__(self, fileobj, start=0, size=maxint):
self._pos = 0

def __repr__(self):
return "<fileview [%d, %d] %r>" % (self._start, self._end, self._fileobj)
return "<fileview [%d, %d] %r>" % (self._start, self._end, self._fileobj) # noqa: UP031

def tell(self):
return self._pos

def _checkwindow(self, seekto, op):
if not (self._start <= seekto <= self._end):
raise OSError(
"%s to offset %d is outside window [%d, %d]"
"%s to offset %d is outside window [%d, %d]" # noqa: UP031
% (op, seekto, self._start, self._end)
)

Expand Down
4 changes: 2 additions & 2 deletions conda_build/skeletons/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def skeletonize(

if pypi_resp.status_code != 200:
sys.exit(
"Request to fetch %s failed with status: %d"
"Request to fetch %s failed with status: %d" # noqa: UP031
% (package_pypi_url, pypi_resp.status_code)
)

Expand Down Expand Up @@ -658,7 +658,7 @@ def get_download_data(
if manual_url:
for i, url in enumerate(urls):
print(
"%d: %s (%s) %s"
"%d: %s (%s) %s" # noqa: UP031
% (i, url["url"], human_bytes(url["size"]), url["comment_text"])
)
n = int(input("which version should i use? "))
Expand Down
Loading

0 comments on commit 36f23c3

Please sign in to comment.