Commit Graph

18 Commits

Author SHA1 Message Date
Miro Hrončok 5919708f6c https://fedoraproject.org/wiki/Changes/Python3.9
Also switch to PEP 503 based %py_dist_name (see rhbz#1791530)
2020-05-21 17:39:01 +02:00
Miro Hrončok 4569c61d8d Strip tildes from %version in %pypi_source by default, add tests 2020-05-12 11:05:30 +02:00
Miro Hrončok 5f3e4d6300 Change %__default_python3_pkgversion from 38 to 3.8
See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/message/VIUS7WMQMDX6H2WEIH7TVTMBB6SUHY7E/
2020-05-07 21:47:38 +02:00
Miro Hrončok 5fe974759a Make %py_provides work repeatedly 2020-05-05 13:54:28 +02:00
Miro Hrončok 8fea79b1ec Implement %py_provides 2020-05-05 13:54:26 +02:00
Miro Hrončok 1b3e731dc6 Brand as "3.8", rework %python_provide
- Hardcode the default Python 3 version in the SRPM macros
- Provide python38-foo for python3-foo and the other way around (future RHEL compatibility)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1812087

    $ rpm --eval '%python_provide python38-setuptools'
    Provides: python-setuptools = %{version}-%{release}
    Provides: python3-setuptools = %{version}-%{release}
    Obsoletes: python-setuptools < %{version}-%{release}

    $ rpm --eval '%python_provide python3-setuptools'
    Provides: python-setuptools = %{version}-%{release}
    Provides: python38-setuptools = %{version}-%{release}
    Obsoletes: python-setuptools < %{version}-%{release}

    $ rpm --eval '%python_provide python39-setuptools'

    $ rpm --define 'python3_pkgversion 39' --eval '%python_provide python%{python3_pkgversion}-setuptools'

To make the implementation of %python_provide easier,
any names starting with "python" or "pypy" are recognized as valid arguments.

Previously, this was an ERROR:

    $ rpm --eval '%python_provide pythonista'
    %python_provide: ERROR: pythonista not recognized.

Now it is a no-op. The behavior was never documented and the change is
backwards compatible for working spec files.
2020-03-25 17:27:06 +01:00
Miro Hrončok f0be0a2983 Define %python, but make it work only if %__python is redefined 2019-12-28 19:10:09 +01:00
Miro Hrončok af35bb0ac9 Define %python2 and %python3
See https://pagure.io/packaging-committee/issue/907

Redefine %__pythonX to change the behavior of %pythonX, %pythonX_version, etc.
Use %pythonX in spec.
2019-09-27 10:02:49 +02:00
Miro Hrončok cf8051e7f5 Make %__python /usr/bin/python once again until we are ready
See https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/22#comment-26552
and further.
2019-06-17 16:29:44 +02:00
Miro Hrončok 536b2efe4e Move %__python definition to the srpm macros, so it is always present 2019-06-12 11:34:53 +02:00
Tomas Orsava beaa2eec4f Move the __python2/3 macros to the python-srpm-macros subpackage
This facilitates using the %%{__python2/3} in Build/Requires
2018-09-20 13:36:47 +02:00
Jason Tibbitts 37a004eed8 Add %pypi_source macro.
Adds the %pypi_source macro, as well as %__pypi_url and
%__pypi_default_extension.  This should make references to sources in
PyPI much simpler for nearly all Python packages.
2018-06-18 12:54:12 -05:00
Tomas Orsava 6cc8000e14 Fix the %py_dist_name macro
..to not convert dots (".") into dashes, so that submodules can be
addressed as well

Resolves: rhbz#1564095
2018-04-06 11:48:08 +02:00
Tomas Orsava 123ad4b49f Added macros for Build/Requires tags using Python dist tags
https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2017-01-17 10:28:13 +01:00
Orion Poplawski 49ccad99b2 Revert "Move srpm macros to macros.0python-srpm to be defined before other macros"
This reverts commit 1a6f8f12f8.
2016-01-14 20:49:29 -07:00
Orion Poplawski 1a6f8f12f8 Move srpm macros to macros.0python-srpm to be defined before other macros 2016-01-14 20:40:15 -07:00
Orion Poplawski cbf9c3d9a6 Move py3_other macros to srpm-macros 2016-01-14 15:32:18 -07:00
Orion Poplawski ec28c775cd Initial import 2016-01-12 16:52:28 -07:00