Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild new versions #33

Merged
merged 2 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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