Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-10-25 Thread Panu Matilainen
Merged #221.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#event-1309319368___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-10-25 Thread Panu Matilainen
Dropped the ball with this one, sorry.

Also missed the fact the shebang is not used in the actual macro invocation, so 
withdrawing my grumblings.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-339249291___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-10-23 Thread Ville Skyttä
@pmatilai @Conan-Kudo ping?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-338811478___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-08-28 Thread Ville Skyttä
scop commented on this pull request.



> @@ -0,0 +1,27 @@
+#!/usr/bin/python -tt

Shouldn't really matter all that much, because the script is invoked with an 
explicit "outside" interpreter without the shebang affecting anything, but 
meh... dropped.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#discussion_r135551002___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-08-28 Thread Ville Skyttä
@scop pushed 1 commit.

9e192ce  python-macro-helper: Drop -tt from shebang


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221/files/f4ee9662cf5c0a04e1928487f1480eccc6d598b1..9e192cef134dd149e7813e7fc93bfa193ee95e4a
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-08-28 Thread ニール・ゴンパ
Conan-Kudo requested changes on this pull request.



> @@ -0,0 +1,27 @@
+#!/usr/bin/python -tt

Please don't use `-tt`, as that switch is deprecated and removed in Python 3.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#pullrequestreview-58971161___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-08-28 Thread Ville Skyttä
Rebased. @pmatilai ping?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-325380081___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-29 Thread Ville Skyttä
I don't see how this change would affect that use case at all. Before this 
change, the macros were expanded using `%{__python}`, and they still are (the 
shebang in the scriptlet is not used).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-311886430___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-28 Thread Panu Matilainen
Sorry, was on vacation for a week (and will be again for all of July)

The patch as such looks fine to me, no problem with that.

What I'm wondering about is that this of course loses is the ability to easily 
override python version both at run- and buildtime. The latter isn't that 
relevant since `PYTHON=python3 ./configure [...]` doesn't actually work, but 
the former will break some specs. There are more than just a handful of specs 
that override __python to eg python3 in rawhide, for example:
```
gaupol.spec:%global __python %{__python3}
gdb.spec:%global __python %{__python3}
gedit-code-assistance.spec:%global __python %{__python3}
gedit-plugins.spec:%global __python %{__python3}
gedit.spec:%global __python %{__python3}
git-cola.spec:%global __python %{__python3}
```

I'm not really up to date with Fedora (python) packaging policies, perhaps 
these are not either, but Fedora aside there *is*  chance of breaking packages 
that expect to override `%__python` to point to python3 for use with 
`%python_*` macros, which they quite legitimately (AFAICS) could've been doing 
up to this point. So if we break that, we need to at least have an alternative 
that we can point to. Do we?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-311585242___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-25 Thread Ville Skyttä
Ping?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-310887287___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-19 Thread Ville Skyttä
Combining done, script renamed to python-macro-helper. I think the installation 
point in rpm's dir structure serves as a prefix/namespace already.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-309346430___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-07 Thread Panu Matilainen
I thought I already commented on this but guess not... anyway, I thought having 
separate tiny scriptlets for such closely related items seemed a bit much. 
`python-rpminfo` which offers switches or commands to retrieve the parameters 
seems more like it. Or maybe `rpminfo-python` to prefix by the owner?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-307006494___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-07 Thread Ville Skyttä
It'll take me about a week and a half until I'll get back to this. If anyone 
wants to ahead with this in the meantime, please feel free.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-306988703___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-07 Thread ニール・ゴンパ
`python-rpminfo`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-306805891___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-07 Thread Ville Skyttä
`python_sitedirs` is otherwise fine, but it will also in its current form be 
used to retrieve the python version, which seems a bit odd to me. Also, perhaps 
it will be extended to generate some new other macros in the future. I'm 
currently thinking along the lines of `python-macrotool` or `python-macro` or 
`python-macros`. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-306803359___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-07 Thread ニール・ゴンパ
@scop that sounds like a good idea.

I'd suggest `python_sitedirs` as the script name.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-306802061___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-02 Thread Russ Herrold
My archive of unpacked .spec file disputes @ignatenkobrain comment above --

 backward compatibility matters

[herrold@centos-7 SPECS]$ grep "\%py" *spec | grep -v ":#"  | wc
 39 1461953
[herrold@centos-7 SPECS]$ grep "\%py" *spec | grep -v ":#"  
BitTorrent.spec:%pyrequires_eq  python-modules
compat-wxPython.spec:- use %%python_sitelib macro
denyhosts.spec:- Include everything under %%python_sitelib to pick up any 
egg-info files that
eric3.spec:%pyrequires_eq   python-modules
eric3.spec:%py_comp $RPM_BUILD_ROOT%{py_sitedir}/*
eric3.spec:%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/*
eric3.spec:- Release 3. STBR for Ac. %pyrequires_eq python-modules -> R: 
python-modules. Eric is pure Python app.
gpsd.spec:- Use %%python_sitelib for python site-files stuff.
postgresql.spec:%if %python
postgresql.spec:%if %python
postgresql.spec:Conflicts: python < %pyver, python >= %pynextver
postgresql.spec:%if %python
postgresql.spec:%if %python
postgresql.spec:%if %python
postgresql.spec:%if %python
postgresql.spec:%if %python
postgresql.spec:%if %python
PyKDE-3.7.spec:echo yes | %pythonprog build.py \
PyKDE.spec:- Req: python-abi = %%python_ver
PyQt4.spec:- use %%python_sitearch
PyQt.spec:- Req: python-abi = %%python_ver
PyQt.spec:- use/Require: %%python_sitearch
python-dialog.spec:- Change %%python_sitearch to %%python_sitelib as sitearch 
references
python-lazy-object-proxy.spec:%{?python_provide:%python_provide 
python2-%{srcname}}
python-lazy-object-proxy.spec:%{?python_provide:%python_provide 
python3-%{srcname}}
python-lazy-object-proxy.spec:%py2_build
python-lazy-object-proxy.spec:%py3_build
python-lazy-object-proxy.spec:%py2_install
python-lazy-object-proxy.spec:%py3_install
python-pandas.spec:%py3_build
python-pandas.spec:%py3_install
python-parsimonious.spec:%py2_build
python-parsimonious.spec:%py2_install
python-PyKDE.spec:%pyrequires_eqpython
python-PyKDE.spec:%py_comp $RPM_BUILD_ROOT%{py_sitedir}
python-PyKDE.spec:%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
python.spec:- add %%python3_version to the rpm macros (rhbz#719082)
python.spec:- add %%py3dir macro to macros.python3 (to be used during unified 
python 2/3
rrdtool.spec:- Define %%python_version *before* its needed (#237826)
[herrold@centos-7 SPECS]$ 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-305812544___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-06-02 Thread Igor Gnatenko
I am wondering if we should remove all this python stuff from RPM because no 
one should use %python_sitelib due to py2/py3 things and such.. RPM doesn't 
depend on python..

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-305722414___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-05-22 Thread ニール・ゴンパ
Conan-Kudo approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#pullrequestreview-39478138___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-05-21 Thread Ville Skyttä
Oh well, anyway, since it was not my purpose to actually make the sys.stdout -> 
print changes, they're back to sys.stdout.write in this latest revision.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-303005050___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-05-21 Thread Ville Skyttä
Oops, the print stuff is like I said in the macros shipped by Fedora's 
python-rpm-macros, not here (here they were using sys.stdout.write). But the 
rest of what I said still stands.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-303003879___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-05-21 Thread Ville Skyttä
`.py` suffixes removed.

I don't think there's anything fragile about this particular use of `print`, 
nor does it require the `print_function` import. It is also nothing new, the 
previous `%python_sitelib` and `%python_sitearch` definitions used it too.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-303003577___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-05-21 Thread ニール・ゴンパ
It's missing the `from __future__ import print_function`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-302966797___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-05-21 Thread Florian Festi
Using print() looks fragile from a Python 2 vs Python 3 POV.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#issuecomment-302966759___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Python macro improvements (#221)

2017-05-21 Thread ニール・ゴンパ
Conan-Kudo requested changes on this pull request.

I would suggest renaming the files so that they don't end in `.py`. That way, 
they won't be byte compiled by either the interpreter or by rpm during the 
package build process.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/221#pullrequestreview-39359270___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint