Revert "rust-hack"

This reverts commit 7e8b5a9c9d.
This commit is contained in:
Mads Kiilerich 2022-04-06 09:50:27 +02:00
parent 24a9b36e37
commit 8d3639f59e

View File

@ -22,13 +22,11 @@ BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-docutils
BuildRequires: rust-packaging
Provides: hg = %{version}-%{release}
Requires: python3
Requires: emacs-filesystem
Recommends: python3-fb-re2
Recommends: mercurial-rust = %{version}-%{release}
%description
Mercurial is a fast, lightweight source control management system designed
@ -69,43 +67,11 @@ Mercurial. When you type chg, a C program connects to that background process
and executes Mercurial commands.
%package rust
Summary: Mercurial Rust extensions for speeding up certain operations
Requires: hg = %{version}-%{release}
%description rust
The following operations are sped up when using Rust:
- discovery of differences between repositories (pull/push)
- nodemap (see :hg:`help config.format.use-persistent-nodemap`)
- all commands using the dirstate (status, commit, diff, add, update, etc.)
- dirstate-v2 (see :hg:`help config.format.use-dirstate-v2`)
- iteration over ancestors in a graph
More features are in the works, and improvements on the above listed are still
in progress. For more experimental work see the "rhg" section.
%prep
%setup -q -n %{name}-%{upstreamversion}
#sed -i setup.py -e "s/'cargo', 'rustc', '--release'/\0, '--offline'/g"
pushd rust
#autosetup -n %{crate}-%{version_no_tilde} -p1
echo
%cargo_prep
echo
#generate_buildrequires
echo
#cargo_generate_buildrequires -a
popd
%build
pushd rust
%cargo_build -a
popd
echo PYTHON=%{python3} make all
PYTHON=%{python3} make all
# chg will invoke the 'hg' command - no direct Python dependency
pushd contrib/chg
@ -113,12 +79,8 @@ make
popd
%install
pushd rust
%cargo_install -a
popd
echo %{python3} setup.py install -O1 --root %{buildroot} --prefix %{_prefix} --record=%{name}.files
echo make install-doc DESTDIR=%{buildroot} MANDIR=%{_mandir}
%{python3} setup.py install -O1 --root %{buildroot} --prefix %{_prefix} --record=%{name}.files
make install-doc DESTDIR=%{buildroot} MANDIR=%{_mandir}
grep -v -e 'hgk.py*' \
-e "%{python3_sitearch}/mercurial/" \
@ -214,8 +176,6 @@ pathfix.py -pni "%{python3}" %{buildroot}%{_bindir}/hg-ssh
%{_bindir}/chg
%doc %attr(644,root,root) %{_mandir}/man?/chg.*.gz
%files rust
%{python3_sitearch}/mercurial/rustext.cpython-*-*-linux-gnu.so
#%%check
# This will now fail everytime. Mercurial is not ported properly for Python3