diff --git a/cargo-librusty-v8 b/cargo-librusty-v8 new file mode 100644 index 0000000..6977c3e Binary files /dev/null and b/cargo-librusty-v8 differ diff --git a/cargo-vendor-cache b/cargo-vendor-cache new file mode 100644 index 0000000..fe62c0e Binary files /dev/null and b/cargo-vendor-cache differ diff --git a/python-vl-convert-python.spec b/python-vl-convert-python.spec new file mode 100644 index 0000000..e249691 --- /dev/null +++ b/python-vl-convert-python.spec @@ -0,0 +1,71 @@ +%global _empty_manifest_terminate_build 0 +%global pypi_name vl-convert-python + +Name: python-%{pypi_name} +Version: 0.13.1 +Release: 1 +Summary: Convert Vega-Lite chart specifications to SVG, PNG, or Vega. + +License: BSD-3-Clause +URL: https://github.com/jonmmease/vl-convert +Source0: https://files.pythonhosted.org/packages/10/62/6e41e11047eecb596db4cdc339675386f087556e2b2d426c73d269358c95/vl_convert_python-0.13.1.tar.gz +Source1: cargo-vendor-cache +Source2: cargo-librusty-v8 + +BuildRequires: rust-packaging +BuildRequires: cmake +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools-rust +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-hatchling +BuildRequires: python3-maturin + +%description +Convert Vega-Lite chart specifications to SVG, PNG, or Vega. + + +%package -n python3-%{pypi_name} +Summary: %{summary} + +%description -n python3-%{pypi_name} +Convert Vega-Lite chart specifications to SVG, PNG, or Vega. + + +%prep +%autosetup -p1 -n vl_convert_python-%{version} +tar xzvf %{SOURCE1} -C . +tar xzvf %{SOURCE2} -C ./vendor/v8/ +oldsum=$(sha256sum ./vendor/v8/build.rs) +oldv8=${oldsum%%%% *} +sed -i '/ env::var(\"RUSTY_V8_MIRROR\")/,1 d' ./vendor/v8/build.rs +sed -i "s#^ let base =.*# let base = env\:\:current_dir().unwrap().into_os_string().into_string().unwrap();#g" ./vendor/v8/build.rs +newsum=$(sha256sum ./vendor/v8/build.rs) +newv8=${newsum%%%% *} +sed -i s#${oldv8}#${newv8}#g `grep ${oldv8} -rl ./vendor/v8/` +mkdir .cargo +cat >> .cargo/config.toml << EOF +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" +EOF + + +%build +%pyproject_build + +%install +%pyproject_install + +%files -n python3-%{pypi_name} +%doc README.md +%license LICENSE +%{python3_sitearch}/vl_convert +%{python3_sitearch}/vl_convert*.dist-info/ + +%changelog +* Fri Sep 15 2023 Dongxing Wang - 0.13.1-1 +- Initial package diff --git a/vl_convert_python-0.13.1.tar.gz b/vl_convert_python-0.13.1.tar.gz new file mode 100644 index 0000000..2d902f5 Binary files /dev/null and b/vl_convert_python-0.13.1.tar.gz differ