Skip to content

Commit

Permalink
Merge pull request #33 from wolfv/rebuild_new_versions
Browse files Browse the repository at this point in the history
Rebuild new versions
  • Loading branch information
wolfv authored Apr 14, 2022
2 parents c1eb67e + 6df5c85 commit 2e88ee8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .scripts/build_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ conda activate base
conda config --set remote_max_retries 5

echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build."
conda install -n base --quiet --yes conda-forge-ci-setup=3 conda-build boa quetz-client -c conda-forge
mamba install -n base --quiet --yes conda-forge-ci-setup=3 conda-build boa quetz-client -c conda-forge

set -e

Expand Down
36 changes: 24 additions & 12 deletions vinca/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def generate_output(pkg_shortname, vinca_conf, distro, version, all_pkgs=None):
if not pkg_names:
return None

if pkg_names[0] in vinca_conf["skip_built_packages"]:
if (pkg_names[0], version) in vinca_conf["skip_built_packages"]:
return None

output = {
Expand Down Expand Up @@ -411,7 +411,7 @@ def sortkey(k):
output["requirements"]["host"].remove("pyqt-builder")
output["requirements"]["host"] += [
{"sel(build_platform == target_platform)": "pyqt-builder"}
]
]

# fixup problems with udev (which is mapped to libusb):
if (
Expand Down Expand Up @@ -519,16 +519,21 @@ def get_pkg(pkg_name):
return outputs


def get_version(distro, vinca_conf, pkg_shortname):
version = distro.get_version(pkg_shortname)
if (
vinca_conf.get("package_version")
and vinca_conf["package_version"][pkg_shortname]
):
version = vinca_conf["package_version"][pkg_shortname]["version"]

return version


def generate_outputs_version(distro, vinca_conf):
outputs = []
for pkg_shortname in vinca_conf["_selected_pkgs"]:
version = distro.get_version(pkg_shortname)
if (
vinca_conf["package_version"]
and vinca_conf["package_version"][pkg_shortname]
):
version = vinca_conf["package_version"][pkg_shortname]["version"]

version = get_version(distro, vinca_conf, pkg_shortname)
output = generate_output(pkg_shortname, vinca_conf, distro, version)
if output is not None:
outputs.append(output)
Expand All @@ -548,7 +553,11 @@ def generate_source(distro, vinca_conf):
entry["git_url"] = url
entry["git_rev"] = version
pkg_names = resolve_pkgname(pkg_shortname, vinca_conf, distro)
if not pkg_names or pkg_names[0] in vinca_conf["skip_built_packages"]:
pkg_version = get_version(distro, vinca_conf, pkg_shortname)
print("Checking ", pkg_shortname, pkg_version)
if not pkg_names:
continue
if (pkg_names[0], pkg_version) in vinca_conf["skip_built_packages"]:
continue
pkg_name = pkg_names[0]
entry["folder"] = "%s/src/work" % pkg_name
Expand Down Expand Up @@ -591,7 +600,10 @@ def generate_source_version(distro, vinca_conf):
entry["git_url"] = url
entry["git_rev"] = version
pkg_names = resolve_pkgname(pkg_shortname, vinca_conf, distro)
if not pkg_names or pkg_names[0] in vinca_conf["skip_built_packages"]:
if (
not pkg_names
or (pkg_names[0], version) in vinca_conf["skip_built_packages"]
):
continue
pkg_name = pkg_names[0]
entry["folder"] = "%s/src/work" % pkg_name
Expand Down Expand Up @@ -945,7 +957,7 @@ def main():

if is_built:
print(f"Skipping {pkg['name']}")
skip_built_packages.add(pkg["name"])
skip_built_packages.add((pkg["name"], pkg["version"]))

vinca_conf["skip_built_packages"] = skip_built_packages
else:
Expand Down
2 changes: 1 addition & 1 deletion vinca/templates/build_ament_python.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# DO NOT EDIT!

pushd $SRC_DIR/$PKG_NAME/src/work
$PYTHON -m pip install . --no-deps -vvv
$PYTHON -m pip install . --no-deps -vvv

0 comments on commit 2e88ee8

Please sign in to comment.