#3 %pyproject_install fixes
Merged 2 months ago by pkopkan. Opened 2 months ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros fix_fi  into  master

file modified
+1 -1

@@ -31,7 +31,7 @@ 

  Limitations

  -----------

  

- `%pyproject_install` currently installs all wheels in `%_builddir`. We are working on a more explicit solution.

+ `%pyproject_install` currently installs all wheels in `$PWD`. We are working on a more explicit solution.

  

  This macro changes shebang lines of every Python script in `%{buildroot}%{_bindir}` to `#! %{__python3} %{py3_shbang_opt}` (`#! /usr/bin/python -s`).

  We plan to preserve exisiting Python flags in shebangs, but the work is not yet finished.

file modified
+8 -8

@@ -5,14 +5,14 @@ 

  

  

  %pyproject_install() %{expand:\\\

- %{__python3} -m pip install   --root %{buildroot}  --strip-file-prefix %{buildroot} --no-deps  --disable-pip-version-check --progress-bar off --verbose --ignore-installed ./*.whl

- if [ -e %{buildroot}%{_bindir} ]

- then

- pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*

+ %{__python3} -m pip install   --root %{buildroot}  --strip-file-prefix %{buildroot} --no-deps  --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location ./*.whl

+ if [ -e %{buildroot}%{_bindir} ]; then

+   pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*

  fi

- if [ -e %{buildroot}%{python3_sitelib}]

- sed -i -e 's/pip/rpm/g' %{buildroot}%{python3_sitelib}/*.dist-info/INSTALLER

+ if [ -e %{buildroot}%{python3_sitelib}]; then

+   sed -i -e 's/pip/rpm/g' %{buildroot}%{python3_sitelib}/*.dist-info/INSTALLER

+ fi

+ if [ -e %{buildroot}{python3_sitearch}]; then

+   sed -i -e 's/pip/rpm/g' %{buildroot}%{python3_sitearch}/*.dist-info/INSTALLER

  fi

- if [ -e %{buildroot}{python3_sitearch}]

- sed -i -e 's/pip/rpm/g' %{buildroot}%{python3_sitearch}/*.dist-info/INSTALLER

  }

file modified
+4 -1

@@ -1,6 +1,6 @@ 

  Name:           pyproject-rpm-macros

  Version:        0

- Release:        1%{?dist}

+ Release:        2%{?dist}

  License:        MIT

  Source0:        macros.pyproject

  Source1:        README.md

@@ -37,6 +37,9 @@ 

  %license LICENSE

  

  %changelog

+ * Tue Jul 02 2019 Miro Hrončok <mhroncok@redhat.com> - 0-2

+ - Fix shell syntax errors in %%pyproject_install

+ - Drop PATH warning in %%pyproject_install

  

  * Fri Jun 28 2019 Patrik Kopkan <pkopkan@redhat.com> - 0-1

  - created package

no initial comment

This looks good to me.

Pull-Request has been merged by pkopkan

2 months ago