Skip to content

Commit

Permalink
Pass source url to factory function
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Oct 18, 2024
1 parent 68152f0 commit 351664a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions empack/filter_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ def iterate_env_pkg_meta(env_prefix):


def write_minimal_conda_meta(pkg_meta, env_prefix):
content = {
k: pkg_meta[k]
for k in ["name", "version", "build", "build_number", "url"]
}
content = {k: pkg_meta[k] for k in ["name", "version", "build", "build_number", "url"]}
conda_meta_dir = Path(env_prefix) / "conda-meta"
conda_meta_dir.mkdir(parents=True, exist_ok=True)

Expand Down
3 changes: 1 addition & 2 deletions empack/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,11 @@ def pack_env(
build=pkg_meta["build"],
filename_stem=base_fname,
filename=f"{base_fname}.tar.{compression_format}",
source_url=pkg_meta["url"],
)

package_url = None
if package_url_factory:
package_url = package_url_factory(pkg_dict)
package_url = package_url_factory(pkg_dict, source_url=pkg_meta["url"])
if package_url is not None:
pkg_dict["url"] = package_url
packages_info.append(pkg_dict)
Expand Down

0 comments on commit 351664a

Please sign in to comment.