init package with version 0.13.1

This commit is contained in:
desert-sailor 2023-09-14 09:10:23 +08:00
parent 9a56fdc868
commit 5db46b855d
4 changed files with 71 additions and 0 deletions

BIN
cargo-librusty-v8 Normal file

Binary file not shown.

BIN
cargo-vendor-cache Normal file

Binary file not shown.

View File

@ -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 <dxwangk@isoftstone.com> - 0.13.1-1
- Initial package

Binary file not shown.