[dev] Enable rpm python dist dependency generator (#506)

* Enable python dist deps generator in mariner-rpm-macros

* Update dist provides for subpackages in python3

* Disable auto dependency generator to avoid unneeded implicit requirements

* Spec cleaner

* Update aarch64 manifests

* Disable deps generator for python-nocasedict
This commit is contained in:
rychenf1 2021-01-06 09:09:41 -08:00 committed by GitHub
parent 69947fd154
commit 41c4b74f34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 509 additions and 134 deletions

View File

@ -15,6 +15,8 @@
"macros.python-srpm": "63d73bc64d58739e7d4ca020a698cc83106d6e555508d0c7bd186e24a5067366",
"macros.python2": "954d866a657d44f1a0418935475633961223ddb7ef84de50d58bc907d7651b37",
"macros.python3": "2d9559f1ffdd20908bbe3d483bb2b7b8127137750cf65ef5552e008fed339c1f",
"pythondist.attr": "96e85d1b28dac793a030bf7c0c82b9439b46d8559c4fcda9031217dc65d9ada8",
"pythondistdeps.py": "b74afcae87b989ded5ce10dfa65bcb1f56630d07dbe670592e1205d5c2bf0ef8",
"rpmrc": "c197369d806430f581de9d5f0e89384d231745712f394ce39497ada47d1f4efe"
}
}

View File

@ -2,7 +2,7 @@
Summary: Mariner specific rpm macro files
Name: mariner-rpm-macros
Version: 1.0
Release: 9%{?dist}
Release: 10%{?dist}
License: GPL+
Vendor: Microsoft Corporation
Distribution: Mariner
@ -23,6 +23,8 @@ Source12: macros.mono-srpm
Source13: macros.ocaml-srpm
Source14: macros.perl-srpm
Source15: gpgverify
Source16: pythondist.attr
Source17: pythondistdeps.py
Provides: redhat-rpm-config
Provides: openblas-srpm-macros
Provides: ocaml-srpm-macros
@ -63,6 +65,9 @@ install -p -m 755 -t %{buildroot}%{rcdir} gpgverify
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d macros.*
mkdir -p %{buildroot}%{_fileattrsdir}
install -p -m 644 -t %{buildroot}%{_fileattrsdir} pythondist.attr
install -p -m 755 -t %{buildroot}%{_rpmconfigdir} pythondistdeps.py
%files
%defattr(-,root,root)
@ -82,8 +87,13 @@ install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d macros.*
%files -n mariner-python-macros
%{_rpmconfigdir}/macros.d/macros.python*
%{_fileattrsdir}/pythondist.attr
%{_rpmconfigdir}/pythondistdeps.py
%changelog
* Mon Jan 04 2021 Ruying Chen <v-ruyche@microsoft.com> - 1.0-10
- Enable python dependency generator for dist provides.
* Wed Nov 04 2020 Joe Schmitt <joschmit@microsoft.com> - 1.0-9
- Define meson macros.

View File

@ -0,0 +1,3 @@
%__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
%__pythondist_path ^/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$

View File

@ -0,0 +1,305 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright 2010 Per Øyvind Karlsen <proyvind@moondrake.org>
# Copyright 2015 Neal Gompa <ngompa13@gmail.com>
#
# This program is free software. It may be redistributed and/or modified under
# the terms of the LGPL version 2.1 (or later).
#
# RPM python dependency generator, using .egg-info/.egg-link/.dist-info data
#
from __future__ import print_function
from getopt import getopt
from os.path import basename, dirname, isdir, sep
from sys import argv, stdin, version
from distutils.sysconfig import get_python_lib
from warnings import warn
opts, args = getopt(
argv[1:], 'hPRrCEMmLl:',
['help', 'provides', 'requires', 'recommends', 'conflicts', 'extras', 'majorver-provides', 'majorver-only', 'legacy-provides' , 'legacy'])
Provides = False
Requires = False
Recommends = False
Conflicts = False
Extras = False
Provides_PyMajorVer_Variant = False
PyMajorVer_Deps = False
legacy_Provides = False
legacy = False
def normalize_name(name):
"""https://www.python.org/dev/peps/pep-0503/#normalized-names"""
import re
return re.sub(r'[-_.]+', '-', name).lower()
for o, a in opts:
if o in ('-h', '--help'):
print('-h, --help\tPrint help')
print('-P, --provides\tPrint Provides')
print('-R, --requires\tPrint Requires')
print('-r, --recommends\tPrint Recommends')
print('-C, --conflicts\tPrint Conflicts')
print('-E, --extras\tPrint Extras ')
print('-M, --majorver-provides\tPrint extra Provides with Python major version only')
print('-m, --majorver-only\tPrint Provides/Requires with Python major version only')
print('-L, --legacy-provides\tPrint extra legacy pythonegg Provides')
print('-l, --legacy\tPrint legacy pythonegg Provides/Requires instead')
exit(1)
elif o in ('-P', '--provides'):
Provides = True
elif o in ('-R', '--requires'):
Requires = True
elif o in ('-r', '--recommends'):
Recommends = True
elif o in ('-C', '--conflicts'):
Conflicts = True
elif o in ('-E', '--extras'):
Extras = True
elif o in ('-M', '--majorver-provides'):
Provides_PyMajorVer_Variant = True
elif o in ('-m', '--majorver-only'):
PyMajorVer_Deps = True
elif o in ('-L', '--legacy-provides'):
legacy_Provides = True
elif o in ('-l', '--legacy'):
legacy = True
if Requires:
py_abi = True
else:
py_abi = False
py_deps = {}
if args:
files = args
else:
files = stdin.readlines()
for f in files:
f = f.strip()
lower = f.lower()
name = 'python(abi)'
# add dependency based on path, versioned if within versioned python directory
if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')):
if name not in py_deps:
py_deps[name] = []
purelib = get_python_lib(standard_lib=0, plat_specific=0).split(version[:3])[0]
platlib = get_python_lib(standard_lib=0, plat_specific=1).split(version[:3])[0]
for lib in (purelib, platlib):
if lib in f:
spec = ('==', f.split(lib)[1].split(sep)[0])
if spec not in py_deps[name]:
py_deps[name].append(spec)
# XXX: hack to workaround RPM internal dependency generator not passing directories
lower_dir = dirname(lower)
if lower_dir.endswith('.egg') or \
lower_dir.endswith('.egg-info') or \
lower_dir.endswith('.dist-info'):
lower = lower_dir
f = dirname(f)
# Determine provide, requires, conflicts & recommends based on egg/dist metadata
if lower.endswith('.egg') or \
lower.endswith('.egg-info') or \
lower.endswith('.dist-info'):
# This import is very slow, so only do it if needed
from pkg_resources import Distribution, FileMetadata, PathMetadata, Requirement, parse_version
dist_name = basename(f)
if isdir(f):
path_item = dirname(f)
metadata = PathMetadata(path_item, f)
else:
path_item = f
metadata = FileMetadata(f)
dist = Distribution.from_location(path_item, dist_name, metadata)
# Check if py_version is defined in the metadata file/directory name
if not dist.py_version:
# Try to parse the Python version from the path the metadata
# resides at (e.g. /usr/lib/pythonX.Y/site-packages/...)
import re
res = re.search(r"/python(?P<pyver>\d+\.\d+)/", path_item)
if res:
dist.py_version = res.group('pyver')
else:
warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
continue
# XXX: https://github.com/pypa/setuptools/pull/1275
import platform
platform.python_version = lambda: dist.py_version
# This is the PEP 503 normalized name.
# It does also convert dots to dashes, unlike dist.key.
# In the current code, we only add additional provides with this.
# Later, we can start requiring them.
# See https://bugzilla.redhat.com/show_bug.cgi?id=1791530
normalized_name = normalize_name(dist.project_name)
if Provides_PyMajorVer_Variant or PyMajorVer_Deps or legacy_Provides or legacy:
# Get the Python major version
pyver_major = dist.py_version.split('.')[0]
if Provides:
# If egg/dist metadata says package name is python, we provide python(abi)
if dist.key == 'python':
name = 'python(abi)'
if name not in py_deps:
py_deps[name] = []
py_deps[name].append(('==', dist.py_version))
if not legacy or not PyMajorVer_Deps:
name = 'python{}dist({})'.format(dist.py_version, dist.key)
if name not in py_deps:
py_deps[name] = []
name_ = 'python{}dist({})'.format(dist.py_version, normalized_name)
if name_ not in py_deps:
py_deps[name_] = []
if Provides_PyMajorVer_Variant or PyMajorVer_Deps:
pymajor_name = 'python{}dist({})'.format(pyver_major, dist.key)
if pymajor_name not in py_deps:
py_deps[pymajor_name] = []
pymajor_name_ = 'python{}dist({})'.format(pyver_major, normalized_name)
if pymajor_name_ not in py_deps:
py_deps[pymajor_name_] = []
if legacy or legacy_Provides:
legacy_name = 'pythonegg({})({})'.format(pyver_major, dist.key)
if legacy_name not in py_deps:
py_deps[legacy_name] = []
if dist.version:
version = dist.version
while version.endswith('.0'):
version = version[:-2]
spec = ('==', version)
if spec not in py_deps[name]:
if not legacy:
py_deps[name].append(spec)
if name != name_:
py_deps[name_].append(spec)
if Provides_PyMajorVer_Variant:
py_deps[pymajor_name].append(spec)
if pymajor_name != pymajor_name_:
py_deps[pymajor_name_].append(spec)
if legacy or legacy_Provides:
py_deps[legacy_name].append(spec)
if Requires or (Recommends and dist.extras):
name = 'python(abi)'
# If egg/dist metadata says package name is python, we don't add dependency on python(abi)
if dist.key == 'python':
py_abi = False
if name in py_deps:
py_deps.pop(name)
elif py_abi and dist.py_version:
if name not in py_deps:
py_deps[name] = []
spec = ('==', dist.py_version)
if spec not in py_deps[name]:
py_deps[name].append(spec)
deps = dist.requires()
if Recommends:
depsextras = dist.requires(extras=dist.extras)
if not Requires:
for dep in reversed(depsextras):
if dep in deps:
depsextras.remove(dep)
deps = depsextras
# console_scripts/gui_scripts entry points need pkg_resources from setuptools
if ((dist.get_entry_map('console_scripts') or
dist.get_entry_map('gui_scripts')) and
(lower.endswith('.egg') or
lower.endswith('.egg-info'))):
# stick them first so any more specific requirement overrides it
deps.insert(0, Requirement.parse('setuptools'))
# add requires/recommends based on egg/dist metadata
for dep in deps:
if legacy:
name = 'pythonegg({})({})'.format(pyver_major, dep.key)
else:
if PyMajorVer_Deps:
name = 'python{}dist({})'.format(pyver_major, dep.key)
else:
name = 'python{}dist({})'.format(dist.py_version, dep.key)
for spec in dep.specs:
while spec[1].endswith('.0'):
spec = (spec[0], spec[1][:-2])
if name not in py_deps:
py_deps[name] = []
if spec not in py_deps[name]:
py_deps[name].append(spec)
if not dep.specs:
py_deps[name] = []
# Unused, for automatic sub-package generation based on 'extras' from egg/dist metadata
# TODO: implement in rpm later, or...?
if Extras:
deps = dist.requires()
extras = dist.extras
print(extras)
for extra in extras:
print('%%package\textras-{}'.format(extra))
print('Summary:\t{} extra for {} python package'.format(extra, dist.key))
print('Group:\t\tDevelopment/Python')
depsextras = dist.requires(extras=[extra])
for dep in reversed(depsextras):
if dep in deps:
depsextras.remove(dep)
deps = depsextras
for dep in deps:
for spec in dep.specs:
if spec[0] == '!=':
print('Conflicts:\t{} {} {}'.format(dep.key, '==', spec[1]))
else:
print('Requires:\t{} {} {}'.format(dep.key, spec[0], spec[1]))
print('%%description\t{}'.format(extra))
print('{} extra for {} python package'.format(extra, dist.key))
print('%%files\t\textras-{}\n'.format(extra))
if Conflicts:
# Should we really add conflicts for extras?
# Creating a meta package per extra with recommends on, which has
# the requires/conflicts in stead might be a better solution...
for dep in dist.requires(extras=dist.extras):
name = dep.key
for spec in dep.specs:
if spec[0] == '!=':
if name not in py_deps:
py_deps[name] = []
spec = ('==', spec[1])
if spec not in py_deps[name]:
py_deps[name].append(spec)
names = list(py_deps.keys())
names.sort()
for name in names:
if py_deps[name]:
# Print out versioned provides, requires, recommends, conflicts
spec_list = []
for spec in py_deps[name]:
if spec[0] == '!=':
spec_list.append('({n} < {v} or {n} >= {v}.0)'.format(n=name, v=spec[1]))
elif spec[0] == '~=':
# Parse the current version
next_ver = parse_version(spec[1]).base_version.split('.')
# Drop the micro version
next_ver = next_ver[0:-1]
# Increment the minor version
next_ver[-1] = str(int(next_ver[-1]) + 1)
next_ver = '.'.join(next_ver)
spec_list.append('({n} >= {v} with {n} < {vnext})'.format(n=name, v=spec[1], vnext=next_ver))
elif spec[0] == '==' and spec[1].endswith('.*'):
# Parse the current version
next_ver = parse_version(spec[1]).base_version.split('.')
# Drop the micro version from both the version in spec and next_ver
next_ver = next_ver[0:-1]
spec = (spec[0], '.'.join(next_ver))
# Increment the minor version
next_ver[-1] = str(int(next_ver[-1]) + 1)
next_ver = '.'.join(next_ver)
spec_list.append('({n} >= {v} with {n} < {vnext})'.format(n=name, v=spec[1], vnext=next_ver))
else:
spec_list.append('{} {} {}'.format(name, spec[0], spec[1]))
if len(spec_list) == 1:
print(spec_list[0])
else:
print('({})'.format(' with '.join(spec_list)))
else:
# Print out unversioned provides, requires, recommends, conflicts
print(name)

View File

@ -2,40 +2,40 @@
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python2_version: %define python2_version %(python2 -c "import sys; sys.stdout.write(sys.version[:3])")}
%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
Summary: pytest is a mature full-featured Python testing tool that helps you write better programs
Name: pytest
Version: 3.8.2
Release: 6%{?dist}
Summary: pytest is a mature full-featured Python testing tool that helps you write better programs
Release: 7%{?dist}
License: MIT
Group: Development/Languages/Python
URL: https://docs.pytest.org
Vendor: Microsoft Corporation
Distribution: Mariner
Group: Development/Languages/Python
URL: https://docs.pytest.org
#Source0: https://github.com/pytest-dev/pytest/archive/%{version}.tar.gz
Source0: https://files.pythonhosted.org/packages/5f/d2/7f77f406ac505abda02ab4afb50d06ebf304f6ea42fca34f8f37529106b2/pytest-%{version}.tar.gz
BuildRequires: python-hypothesis
BuildRequires: python-py
BuildRequires: python-setuptools
BuildRequires: python-setuptools_scm
BuildRequires: python-twisted
BuildRequires: python-xml
BuildRequires: python2
BuildRequires: python2-devel
BuildRequires: python2-libs
BuildRequires: python-setuptools
BuildRequires: python-py
BuildRequires: python-xml
BuildRequires: python-hypothesis
BuildRequires: python-twisted
BuildRequires: python-setuptools_scm
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-py
BuildRequires: python3-hypothesis
BuildRequires: python3-twisted
BuildRequires: python3-py
BuildRequires: python3-setuptools
BuildRequires: python3-xml
BuildRequires: python3-setuptools_scm
BuildRequires: python3-twisted
BuildRequires: python3-xml
Requires: python-py
Requires: python2
Requires: python2-libs
Requires: python-py
AutoReqProv: no
Provides: python2dist(pytest) = %{version}-%{release}
Provides: python2.7dist(pytest) = %{version}-%{release}
BuildArch: noarch
%description
@ -46,6 +46,9 @@ Summary: pytest is a mature full-featured Python testing tool that helps
Requires: python3
Requires: python3-libs
Requires: python3-py
AutoReqProv: no
Provides: python3dist(pytest) = %{version}-%{release}
Provides: python3.7dist(pytest) = %{version}-%{release}
%description -n python3-pytest
@ -100,23 +103,33 @@ make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
%{python3_sitelib}/*
%changelog
* Tue Jan 05 2021 Ruying Chen <v-ruyche@microsoft.com> - 3.8.2-7
- Disable auto dependency generator.
* Sat May 09 00:21:35 PST 2020 Nick Samson <nisamson@microsoft.com> - 3.8.2-6
- Added %%license line automatically
* Thu Apr 30 2020 Emre Girgin <mrgirgin@microsoft.com> 3.8.2-5
- Renaming python-pytest to pytest
* Tue Apr 28 2020 Emre Girgin <mrgirgin@microsoft.com> 3.8.2-4
- Renaming python-Twisted to python-twisted
* Mon Apr 20 2020 Eric Li <eli@microsoft.com> 3.8.2-3
- Update Source0:, add #Source0, and delete sha1. License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 3.8.2-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Oct 09 2018 Tapas Kundu <tkundu@vmware.com> 3.8.2-1
- Updated to release 3.8.2
- Removed buildrequires from subpackage.
* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 3.0.7-3
- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0.7-2
- Use python2 instead of python and rename the scripts in bin directory
* Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0.7-1
- Initial

View File

@ -1,34 +1,34 @@
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%bcond_without python2
%define pkgname nocasedict
%bcond_without python2
Summary: Case-insensitive ordered dictionary library for Python
Name: python-%{pkgname}
Version: 0.5.0
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
URL: https://github.com/pywbem/nocasedict
Vendor: Microsoft
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://github.com/pywbem/nocasedict
#Source0: https://github.com/pywbem/%{pkgname}/archive/%{version}.tar.gz
Source0: %{pkgname}-%{version}.tar.gz
BuildArch: noarch
%description
%description
The NocaseDict class supports the functionality of the built-in dict class of Python 3.8.
%if %{with python2}
%package -n python2-%{pkgname}
Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-xml
BuildRequires: python-six
Requires: python2
BuildRequires: python-xml
BuildRequires: python2-devel
Requires: python-six
Requires: python2
AutoReqProv: no
Provides: python2dist(nocasedict) = %{version}-%{release}
Provides: python2.7dist(nocasedict) = %{version}-%{release}
%if %{with tests}
BuildRequires: python2-pytest >= 3.0.7
%endif
@ -42,19 +42,20 @@ The NocaseDict class supports the functionality of the built-in dict class of Py
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-xml
BuildRequires: python3-six
BuildRequires: python3-xml
Requires: python3
Requires: python3-six
AutoReqProv: no
Provides: python3dist(nocasedict) = %{version}-%{release}
Provides: python3.7dist(nocasedict) = %{version}-%{release}
%if %{with tests}
BuildRequires: python3-pytest >= 3.0.7
%endif
%description -n python3-%{pkgname}
The NocaseDict class supports the functionality of the built-in dict class of Python 3.8.
%prep
%autosetup -n %{pkgname}-%{version} -p 1
rm -rf *.egg-info
@ -98,7 +99,10 @@ python3 setup.py test
%{python3_sitelib}/%{pkgname}
%{python3_sitelib}/*.egg-info
%changelog
* Tue Jan 05 2021 Ruying Chen <v-ruyche@microsoft.com> - 0.5.0-2
- Disable auto dependency generator.
- Add explicit dist provides.
* Fri Aug 21 2020 Thomas Crain <thcrain@microsoft.com> - 0.5.0-1
- Original CBL-Mariner version.
- Original CBL-Mariner version.

View File

@ -1,23 +1,19 @@
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%bcond_without python2
%define pkgname pywbem
%bcond_without python2
Summary: Python WBEM client interface and related utilities
Name: python-%{pkgname}
Version: 1.0.1
Release: 2%{?dist}
Release: 3%{?dist}
License: LGPLv2
URL: https://github.com/pywbem/pywbem
Vendor: Microsoft
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://github.com/pywbem/pywbem
#Source0: https://github.com/%{pkgname}/%{pkgname}/archive/%{version}.tar.gz
Source0: %{pkgname}-%{version}.tar.gz
BuildArch: noarch
%description
A Python library for making CIM (Common Information Model) operations over HTTP\
using the WBEM CIM-XML protocol. It is based on the idea that a good WBEM\
@ -34,20 +30,23 @@ easiest way to write providers on the planet.
%package -n python3-%{pkgname}
Summary: Python3 WBEM Client and Provider Interface
BuildArch: noarch
BuildRequires: python3-pip
BuildRequires: python3-PyYAML
BuildRequires: python3-ply
BuildRequires: python3-pbr
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-ply
BuildRequires: python3-setuptools
Requires: python3
Requires: python3-xml
Requires: python3-requests
Requires: python3-nocasedict
Requires: python3-PyYAML
Requires: python3-yamlloader
Requires: python3-nocasedict
Requires: python3-ply
Requires: python3-requests
Requires: python3-xml
Requires: python3-yamlloader
AutoReqProv: no
Provides: python3dist(pywbem) = %{version}-%{release}
Provides: python3.7dist(pyweb) = %{version}-%{release}
BuildArch: noarch
%description -n python3-%{pkgname}
A WBEM client allows issuing operations to a WBEM server, using the CIM
@ -59,20 +58,23 @@ for more information about WBEM.
%if %{with python2}
%package -n python2-%{pkgname}
Summary: Python2 WBEM Client and Provider Interface
BuildArch: noarch
BuildRequires: python-pip
BuildRequires: PyYAML
BuildRequires: python-ply
BuildRequires: python-pbr
BuildRequires: python2-devel
BuildRequires: python-pip
BuildRequires: python-ply
BuildRequires: python-setuptools
Requires: python2
Requires: python-xml
Requires: python-requests
Requires: python2-nocasedict
BuildRequires: python2-devel
Requires: PyYAML
Requires: python2-yamlloader
Requires: python-ply
Requires: python-requests
Requires: python-xml
Requires: python2
Requires: python2-nocasedict
Requires: python2-yamlloader
AutoReqProv: no
Provides: python2dist(pywbem) = %{version}-%{release}
Provides: python2.7dist(pyweb) = %{version}-%{release}
BuildArch: noarch
%description -n python2-%{pkgname}
A WBEM client allows issuing operations to a WBEM server, using the CIM
@ -98,20 +100,19 @@ popd
PBR_VERSION="%{version}" CFLAGS="%{build_cflags}" python3 setup.py build
%install
rm -rf %{buildroot}
%if %{with python2}
pushd ../p2dir
env PYTHONPATH=%{buildroot}/%{python2_sitelib} \
PBR_VERSION="%{version}" \
python2 setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
rm -rf %{buildroot}/usr/bin/*.bat
rm -rf %{buildroot}%{_bindir}/*.bat
popd
%endif
env PYTHONPATH=%{buildroot}/%{python3_sitelib} \
PBR_VERSION="%{version}" \
python3 setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
rm -rf %{buildroot}/usr/bin/*.bat
rm -rf %{buildroot}%{_bindir}/*.bat
%files -n python3-%{pkgname}
%license LICENSE.txt
@ -130,6 +131,9 @@ rm -rf %{buildroot}/usr/bin/*.bat
%endif
%changelog
* Tue Jan 05 2021 Ruying Chen <v-ruyche@microsoft.com> - 1.0.1-3
- Disable auto dependency generator.
* Fri Aug 21 2020 Thomas Crain <thcrain@microsoft.com> - 1.0.1-2
- Initial CBL-Mariner import from Fedora 33 (license: MIT)
@ -339,8 +343,10 @@ rm -rf %{buildroot}/usr/bin/*.bat
* Fri Jan 01 2010 David Nalley <david@gnsa.us> 0.7.0-3
- refined requires for epel compat
* Sun Jun 28 2009 David Nalley <david@gnsa.us> 0.7.0-2
- Added some verbiage regarding what WBEM is and expanding WBEM and CIM acronyms
- Added python-twisted as a dependency
* Thu Jun 25 2009 David Nalley <david@gnsa.us> 0.7.0-1
- Initial packaging

View File

@ -1,43 +1,44 @@
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Summary: An asynchronous networking framework written in Python
Name: python-twisted
Version: 19.2.1
Release: 5%{?dist}
Release: 6%{?dist}
License: MIT
Group: Development/Languages/Python
Vendor: Microsoft Corporation
Distribution: Mariner
Url: https://twistedmatrix.com
Group: Development/Languages/Python
URL: https://twistedmatrix.com
Source0: https://pypi.python.org/packages/source/T/Twisted/Twisted-%{version}.tar.bz2
Patch0: extra_dependency.patch
Patch1: no_packet.patch
BuildRequires: python2
BuildRequires: python2-libs
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-incremental
BuildRequires: python-zope-interface
BuildRequires: python-cryptography
BuildRequires: pyOpenSSL
BuildRequires: python-cryptography
BuildRequires: python-incremental
BuildRequires: python-setuptools
BuildRequires: python-six
BuildRequires: python-zope-interface
BuildRequires: python2
BuildRequires: python2-devel
BuildRequires: python2-libs
BuildRequires: python3-devel
BuildRequires: python3-libs
BuildRequires: python3-incremental
BuildRequires: python3-zope-interface
BuildRequires: python3-libs
BuildRequires: python3-setuptools
BuildRequires: python3-xml
Requires: python2
Requires: python2-libs
Requires: python-zope-interface
Requires: python-netaddr
Requires: python-incremental
BuildRequires: python3-zope-interface
Requires: python-attrs
Requires: python-constantly
Requires: python-hyperlink
Requires: python-attrs
Requires: python-incremental
Requires: python-netaddr
Requires: python-zope-interface
Requires: python2
Requires: python2-libs
AutoReqProv: no
Provides: python2dist(twisted) = %{version}-%{release}
Provides: python2.7dist(twisted) = %{version}-%{release}
%description
Twisted is an event-driven networking engine written in Python and licensed under the open source MIT license. Twisted runs on Python 2 and an ever growing subset also works with Python 3.
@ -45,15 +46,17 @@ Twisted also supports many common network protocols, including SMTP, POP3, IMAP,
%package -n python3-twisted
Summary: python3-twisted
Requires: python3
Requires: python3-libs
Requires: python3-zope-interface
Requires: python3-netaddr
Requires: python3-incremental
Requires: python3-attrs
Requires: python3-constantly
Requires: python3-hyperlink
Requires: python3-attrs
Requires: python3-incremental
Requires: python3-libs
Requires: python3-netaddr
Requires: python3-zope-interface
AutoReqProv: no
Provides: python3dist(twisted) = %{version}-%{release}
Provides: python3.7dist(twisted) = %{version}-%{release}
%description -n python3-twisted
Python 3 version.
@ -86,7 +89,7 @@ popd
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
easy_install_2=$(ls %{_bindir} |grep easy_install |grep 2)
route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
$easy_install_2 pip
pip install --upgrade tox
@ -94,7 +97,7 @@ chmod g+w . -R
useradd test -G root -m
LANG=en_US.UTF-8 sudo -u test tox -e py27-tests
pushd ../p3dir
easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
easy_install_3=$(ls %{_bindir} |grep easy_install |grep 3)
$easy_install_3 pip
pip install --upgrade tox
chmod g+w . -R
@ -128,48 +131,70 @@ popd
%{_bindir}/cftp3
%changelog
* Tue Jan 05 2021 Ruying Chen <v-ruyche@microsoft.com> - 19.2.1-6
- Disable auto dependency generator
* Sat May 09 00:21:10 PST 2020 Nick Samson <nisamson@microsoft.com> - 19.2.1-5
- Added %%license line automatically
* Wed Apr 29 2020 Emre Girgin <mrgirgin@microsoft.com> 19.2.1-4
- Renaming python-zope.interface to python-zope-interface
* Wed Apr 29 2020 Emre Girgin <mrgirgin@microsoft.com> 19.2.1-3
- Renaming python-pyOpenSSL to pyOpenSSL
* Tue Apr 28 2020 Emre Girgin <mrgirgin@microsoft.com> 19.2.1-2
- Renaming python-Twisted to python-twisted
* Thu Mar 19 2020 Paul Monson <paulmon@microsoft.com> 19.2.1-1
- Update to 19.2.1. Fix Source0 URL. License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 18.7.0-3
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Oct 30 2018 Tapas Kundu <tkundu@vmware.com> 18.7.0-2
- Moved build requires from subpackage
- Added attrs package in requires.
* Thu Sep 13 2018 Tapas Kundu <tkundu@vmware.com> 18.7.0-1
- Upgraded to release 18.7.0
* Fri Oct 13 2017 Alexey Makhalov <amakhalov@vmware.com> 17.5.0-3
- Remove BuildArch
* Mon Sep 11 2017 Dheeraj Shetty <dheerajs@vmware.com> 17.5.0-2
- Added python-automat, python-hyperlink and its python3 version to the
- requires.
* Tue Aug 29 2017 Dheeraj Shetty <dheerajs@vmware.com> 17.5.0-1
- Upgrade version
* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 17.1.0-6
- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 17.1.0-5
- Adding python3 scripts to bin directory
* Tue May 09 2017 Rongrong Qiu <rqiu@vmware.com> 17.1.0-4
- Added python-constantly to the requires.
* Mon Mar 27 2017 Xiaolin Li <xiaolinl@vmware.com> 17.1.0-3
- Added python-netaddr and python-incremental to the requires.
* Thu Mar 23 2017 Xiaolin Li <xiaolinl@vmware.com> 17.1.0-2
- Change requires
* Wed Mar 01 2017 Xiaolin Li <xiaolinl@vmware.com> 17.1.0-1
- Added python3 package and updated to version 17.1.0.
* Mon Oct 10 2016 ChangLee <changlee@vmware.com> 15.5.0-3
- Modified %check
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 15.5.0-2
- GA - Bump release of all rpms
* Thu Jan 21 2016 Anish Swaminathan <anishs@vmware.com> 15.5.0-1
- Upgrade version
* Tue Oct 27 2015 Mahmoud Bassiouny <mbassiouny@vmware.com>
- Initial packaging for Photon

View File

@ -2,7 +2,7 @@
Summary: A high-level scripting language
Name: python3
Version: 3.7.7
Release: 6%{?dist}
Release: 7%{?dist}
License: PSF
Vendor: Microsoft Corporation
Distribution: Mariner
@ -111,6 +111,8 @@ Summary: The PyPA recommended tool for installing Python packages.
Group: Development/Tools
Requires: python3 = %{version}-%{release}
Requires: python3-xml = %{version}-%{release}
Provides: python3dist(pip) = %{version}-%{release}
Provides: python3.7dist(pip) = %{version}-%{release}
BuildArch: noarch
%description pip
@ -121,6 +123,7 @@ Summary: Download, build, install, upgrade, and uninstall Python packages
Group: Development/Tools
Requires: python3 = %{version}-%{release}
Provides: python3dist(setuptools) = %{version}-%{release}
Provides: python3.7dist(setuptools) = %{version}-%{release}
BuildArch: noarch
%description setuptools
@ -273,6 +276,9 @@ rm -rf %{buildroot}/*
%{_libdir}/python3.7/test/*
%changelog
* Mon Jan 04 2021 Ruying Chen <v-ruyche@microsoft.com> - 3.7.7-7
- Add python3 dist provides.
* Fri Dec 11 2020 Joe Schmitt <joschmit@microsoft.com> - 3.7.7-6
- Ship pathfix.py.
- pathfix.py spec changes imported from Fedora 32 (license: MIT)

View File

@ -205,9 +205,9 @@ pcre-libs-8.42-4.cm1.aarch64.rpm
krb5-1.17-3.cm1.aarch64.rpm
lua-5.3.5-11.cm1.aarch64.rpm
lua-libs-5.3.5-11.cm1.aarch64.rpm
mariner-rpm-macros-1.0-9.cm1.noarch.rpm
mariner-python-macros-1.0-9.cm1.noarch.rpm
mariner-check-macros-1.0-9.cm1.noarch.rpm
mariner-rpm-macros-1.0-10.cm1.noarch.rpm
mariner-python-macros-1.0-10.cm1.noarch.rpm
mariner-check-macros-1.0-10.cm1.noarch.rpm
libassuan-2.5.1-5.cm1.aarch64.rpm
libgpg-error-1.32-5.cm1.aarch64.rpm
libgcrypt-1.8.3-4.cm1.aarch64.rpm
@ -232,9 +232,9 @@ python2-2.7.18-3.cm1.aarch64.rpm
python2-devel-2.7.18-3.cm1.aarch64.rpm
python2-libs-2.7.18-3.cm1.aarch64.rpm
python-xml-2.7.18-3.cm1.aarch64.rpm
python3-3.7.7-6.cm1.aarch64.rpm
python3-devel-3.7.7-6.cm1.aarch64.rpm
python3-libs-3.7.7-6.cm1.aarch64.rpm
python3-setuptools-3.7.7-6.cm1.noarch.rpm
python3-xml-3.7.7-6.cm1.aarch64.rpm
python3-3.7.7-7.cm1.aarch64.rpm
python3-devel-3.7.7-7.cm1.aarch64.rpm
python3-libs-3.7.7-7.cm1.aarch64.rpm
python3-setuptools-3.7.7-7.cm1.noarch.rpm
python3-xml-3.7.7-7.cm1.aarch64.rpm
systemd-rpm-macros-239-34.cm1.noarch.rpm

View File

@ -205,9 +205,9 @@ pcre-libs-8.42-4.cm1.x86_64.rpm
krb5-1.17-3.cm1.x86_64.rpm
lua-5.3.5-11.cm1.x86_64.rpm
lua-libs-5.3.5-11.cm1.x86_64.rpm
mariner-rpm-macros-1.0-9.cm1.noarch.rpm
mariner-python-macros-1.0-9.cm1.noarch.rpm
mariner-check-macros-1.0-9.cm1.noarch.rpm
mariner-rpm-macros-1.0-10.cm1.noarch.rpm
mariner-python-macros-1.0-10.cm1.noarch.rpm
mariner-check-macros-1.0-10.cm1.noarch.rpm
libassuan-2.5.1-5.cm1.x86_64.rpm
libgpg-error-1.32-5.cm1.x86_64.rpm
libgcrypt-1.8.3-4.cm1.x86_64.rpm
@ -232,9 +232,9 @@ python2-2.7.18-3.cm1.x86_64.rpm
python2-devel-2.7.18-3.cm1.x86_64.rpm
python2-libs-2.7.18-3.cm1.x86_64.rpm
python-xml-2.7.18-3.cm1.x86_64.rpm
python3-3.7.7-6.cm1.x86_64.rpm
python3-devel-3.7.7-6.cm1.x86_64.rpm
python3-libs-3.7.7-6.cm1.x86_64.rpm
python3-setuptools-3.7.7-6.cm1.noarch.rpm
python3-xml-3.7.7-6.cm1.x86_64.rpm
python3-3.7.7-7.cm1.x86_64.rpm
python3-devel-3.7.7-7.cm1.x86_64.rpm
python3-libs-3.7.7-7.cm1.x86_64.rpm
python3-setuptools-3.7.7-7.cm1.noarch.rpm
python3-xml-3.7.7-7.cm1.x86_64.rpm
systemd-rpm-macros-239-34.cm1.noarch.rpm

View File

@ -247,12 +247,12 @@ m4-1.4.18-4.cm1.aarch64.rpm
m4-debuginfo-1.4.18-4.cm1.aarch64.rpm
make-4.2.1-5.cm1.aarch64.rpm
make-debuginfo-4.2.1-5.cm1.aarch64.rpm
mariner-check-macros-1.0-9.cm1.noarch.rpm
mariner-python-macros-1.0-9.cm1.noarch.rpm
mariner-check-macros-1.0-10.cm1.noarch.rpm
mariner-python-macros-1.0-10.cm1.noarch.rpm
mariner-release-1.0-10.cm1.noarch.rpm
mariner-repos-1.0-11.cm1.noarch.rpm
mariner-repos-preview-1.0-11.cm1.noarch.rpm
mariner-rpm-macros-1.0-9.cm1.noarch.rpm
mariner-rpm-macros-1.0-10.cm1.noarch.rpm
meson-0.49.2-1.cm1.noarch.rpm
mpfr-4.0.1-3.cm1.aarch64.rpm
mpfr-debuginfo-4.0.1-3.cm1.aarch64.rpm
@ -524,21 +524,21 @@ python2-devel-2.7.18-3.cm1.aarch64.rpm
python2-libs-2.7.18-3.cm1.aarch64.rpm
python2-test-2.7.18-3.cm1.aarch64.rpm
python2-tools-2.7.18-3.cm1.aarch64.rpm
python3-3.7.7-6.cm1.aarch64.rpm
python3-3.7.7-7.cm1.aarch64.rpm
python3-cracklib-2.9.7-2.cm1.aarch64.rpm
python3-curses-3.7.7-6.cm1.aarch64.rpm
python3-debuginfo-3.7.7-6.cm1.aarch64.rpm
python3-devel-3.7.7-6.cm1.aarch64.rpm
python3-curses-3.7.7-7.cm1.aarch64.rpm
python3-debuginfo-3.7.7-7.cm1.aarch64.rpm
python3-devel-3.7.7-7.cm1.aarch64.rpm
python3-gpg-1.13.1-5.cm1.aarch64.rpm
python3-libs-3.7.7-6.cm1.aarch64.rpm
python3-libs-3.7.7-7.cm1.aarch64.rpm
python3-libxml2-2.9.10-4.cm1.aarch64.rpm
python3-pip-3.7.7-6.cm1.noarch.rpm
python3-pip-3.7.7-7.cm1.noarch.rpm
python3-pwquality-1.4.2-4.cm1.aarch64.rpm
python3-rpm-4.14.2-11.cm1.aarch64.rpm
python3-setuptools-3.7.7-6.cm1.noarch.rpm
python3-test-3.7.7-6.cm1.aarch64.rpm
python3-tools-3.7.7-6.cm1.aarch64.rpm
python3-xml-3.7.7-6.cm1.aarch64.rpm
python3-setuptools-3.7.7-7.cm1.noarch.rpm
python3-test-3.7.7-7.cm1.aarch64.rpm
python3-tools-3.7.7-7.cm1.aarch64.rpm
python3-xml-3.7.7-7.cm1.aarch64.rpm
python-curses-2.7.18-3.cm1.aarch64.rpm
python-gpg-1.13.1-5.cm1.aarch64.rpm
python-rpm-4.14.2-11.cm1.aarch64.rpm

View File

@ -247,12 +247,12 @@ m4-1.4.18-4.cm1.x86_64.rpm
m4-debuginfo-1.4.18-4.cm1.x86_64.rpm
make-4.2.1-5.cm1.x86_64.rpm
make-debuginfo-4.2.1-5.cm1.x86_64.rpm
mariner-check-macros-1.0-9.cm1.noarch.rpm
mariner-python-macros-1.0-9.cm1.noarch.rpm
mariner-check-macros-1.0-10.cm1.noarch.rpm
mariner-python-macros-1.0-10.cm1.noarch.rpm
mariner-release-1.0-10.cm1.noarch.rpm
mariner-repos-1.0-11.cm1.noarch.rpm
mariner-repos-preview-1.0-11.cm1.noarch.rpm
mariner-rpm-macros-1.0-9.cm1.noarch.rpm
mariner-rpm-macros-1.0-10.cm1.noarch.rpm
meson-0.49.2-1.cm1.noarch.rpm
mpfr-4.0.1-3.cm1.x86_64.rpm
mpfr-debuginfo-4.0.1-3.cm1.x86_64.rpm
@ -524,21 +524,21 @@ python2-devel-2.7.18-3.cm1.x86_64.rpm
python2-libs-2.7.18-3.cm1.x86_64.rpm
python2-test-2.7.18-3.cm1.x86_64.rpm
python2-tools-2.7.18-3.cm1.x86_64.rpm
python3-3.7.7-6.cm1.x86_64.rpm
python3-3.7.7-7.cm1.x86_64.rpm
python3-cracklib-2.9.7-2.cm1.x86_64.rpm
python3-curses-3.7.7-6.cm1.x86_64.rpm
python3-debuginfo-3.7.7-6.cm1.x86_64.rpm
python3-devel-3.7.7-6.cm1.x86_64.rpm
python3-curses-3.7.7-7.cm1.x86_64.rpm
python3-debuginfo-3.7.7-7.cm1.x86_64.rpm
python3-devel-3.7.7-7.cm1.x86_64.rpm
python3-gpg-1.13.1-5.cm1.x86_64.rpm
python3-libs-3.7.7-6.cm1.x86_64.rpm
python3-libs-3.7.7-7.cm1.x86_64.rpm
python3-libxml2-2.9.10-4.cm1.x86_64.rpm
python3-pip-3.7.7-6.cm1.noarch.rpm
python3-pip-3.7.7-7.cm1.noarch.rpm
python3-pwquality-1.4.2-4.cm1.x86_64.rpm
python3-rpm-4.14.2-11.cm1.x86_64.rpm
python3-setuptools-3.7.7-6.cm1.noarch.rpm
python3-test-3.7.7-6.cm1.x86_64.rpm
python3-tools-3.7.7-6.cm1.x86_64.rpm
python3-xml-3.7.7-6.cm1.x86_64.rpm
python3-setuptools-3.7.7-7.cm1.noarch.rpm
python3-test-3.7.7-7.cm1.x86_64.rpm
python3-tools-3.7.7-7.cm1.x86_64.rpm
python3-xml-3.7.7-7.cm1.x86_64.rpm
python-curses-2.7.18-3.cm1.x86_64.rpm
python-gpg-1.13.1-5.cm1.x86_64.rpm
python-rpm-4.14.2-11.cm1.x86_64.rpm

View File

@ -206,6 +206,7 @@ build_rpm_in_chroot_no_install mariner-rpm-macros
copy_rpm_subpackage mariner-check-macros
chroot_and_install_rpms mariner-rpm-macros
chroot_and_install_rpms mariner-check-macros
chroot_and_install_rpms mariner-python-macros
build_rpm_in_chroot_no_install filesystem
build_rpm_in_chroot_no_install kernel-headers
build_rpm_in_chroot_no_install glibc