Bug 1739786 (python-makefun) - Review Request: python-makefun - Dynamically create python functions with a proper signature
Summary: Review Request: python-makefun - Dynamically create python functions with a p...
Keywords:
Status: CLOSED RAWHIDE
Alias: python-makefun
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1739787 1752196
TreeView+ depends on / blocked
 
Reported: 2019-08-10 13:39 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2019-10-04 13:16 UTC (History)
7 users (show)

Fixed In Version: python-makefun-1.6.11-1.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-04 13:16:13 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2019-08-10 13:39:41 UTC
Spec URL: https://in.waw.pl/~zbyszek/fedora/python-makefun.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-makefun-1.6.10-1.fc31.src.rpm
Description:
Dynamically create python functions with a proper signature.

Fedora Account System Username: zbyszek

Comment 1 Ankur Sinha (FranciscoD) 2019-08-12 08:14:32 UTC
Hrm, build failing here in mock:

+ /usr/bin/python3 -I /usr/lib/rpm/redhat/pyproject_buildrequires.py
Handling setuptools >= 40.8 from default build backend
Requirement satisfied: setuptools >= 40.8
   (installed: setuptools 41.0.1)
Handling wheel from default build backend
Requirement satisfied: wheel
   (installed: wheel 0.33.1)
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    from setuptools_scm import get_version
ModuleNotFoundError: No module named 'setuptools_scm'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 241, in main
    extras=args.extras,
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 193, in generate_requires
    generate_build_requirements(backend, requirements)
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 157, in generate_build_requirements
    new_reqs = get_requires()
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 145, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 126, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 141, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 26, in <module>
    'them manually using conda or other system. The list is : ' + str(SETUP_REQUIRES)), e)
  File "<string>", line 3, in raise_from
Exception: Required packages for setup not found. You may wish you execute "pip install -r ci_tools/requirements-setup.txt" to install them or alternatively install them manually using conda or other system. The list is : ['pytest-runner', 'setuptools_scm', 'pypandoc', 'six']
python3-devel
python3dist(packaging)
python3dist(pip) >= 19
python3dist(pytoml)
python3dist(setuptools) >= 40.8
python3dist(wheel)
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.B5svrt (%generate_buildrequires)
    Bad exit status from /var/tmp/rpm-tmp.B5svrt (%generate_buildrequires)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 748, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 892c670464364d028ef47657b304754c -D /var/lib/mock/fedora-rawhide-x86_64/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.m7ve4j6b:/etc/resolv.conf --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=en_GB.UTF-8 -u mockbuild bash --login -c /usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-makefun.spec



%generate_build_requires not working properly?

Comment 2 Ankur Sinha (FranciscoD) 2019-08-12 08:17:12 UTC
There's also no mention of these macros in the python packaging guidelines---should we wait for them to be made public before using them? It makes reviews very hard otherwise---one has to keep looking at their definitions to see what they're doing. Or is there documentation somewhere about them?

Comment 3 Zbigniew Jędrzejewski-Szmek 2019-08-12 12:22:42 UTC
I was told to use mock from updates-testing. I have mock-1.4.17-1.fc29.noarch.
I only looked at https://src.fedoraproject.org/rpms/pyproject-rpm-macros/. This should
be enough, because the way that the macros are used is very simple.

Comment 4 Ankur Sinha (FranciscoD) 2019-08-12 16:21:49 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #3)
> I was told to use mock from updates-testing. I have
> mock-1.4.17-1.fc29.noarch.
> I only looked at https://src.fedoraproject.org/rpms/pyproject-rpm-macros/.
> This should
> be enough, because the way that the macros are used is very simple.

Odd, I have this version already, but fedora-review fails:

mock-1.4.17-1.fc30.noarch

Trying again..

Comment 5 Ankur Sinha (FranciscoD) 2019-08-12 16:29:00 UTC
Hrm, no luck:

---

Mock Version: 1.4.17
Mock Version: 1.4.17
Mock Version: 1.4.17
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-makefun.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_GB.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f9b5d6c8750>timeout=0uid=1000gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.lle62yzs:/etc/resolv.conf']unshare_net=TrueprintOutput=False)
Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.lle62yzs:/etc/resolv.conf']
Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'b2485c78596e47c58b8dfb7be024a637', '-D', '/var/lib/mock/fedora-rawhide-x86_64/root', '-a', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.lle62yzs:/etc/resolv.conf', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;<mock-chroot>\\007"', '--setenv=PS1=<mock-chroot> \\s-\\v\\$ ', '--setenv=LANG=en_GB.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-makefun.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_GB.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1565395200
Wrote: /builddir/build/SRPMS/python-makefun-1.6.10-1.fc31.src.rpm
Child return code was: 0
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-makefun.spec'], chrootPath='/var/lib/mock/fedora-rawhide-x86_64/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_GB.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f9b5d6c8750>timeout=0uid=1000gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.lle62yzs:/etc/resolv.conf']unshare_net=TrueprintOutput=False)
Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.lle62yzs:/etc/resolv.conf']
Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '314bc3d5fae44452943fafc86a609b84', '-D', '/var/lib/mock/fedora-rawhide-x86_64/root', '-a', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.lle62yzs:/etc/resolv.conf', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;<mock-chroot>\\007"', '--setenv=PS1=<mock-chroot> \\s-\\v\\$ ', '--setenv=LANG=en_GB.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-makefun.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_GB.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1565395200
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.fsbTst
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf makefun-1.6.10
+ /usr/bin/gzip -dc /builddir/build/SOURCES/makefun-1.6.10.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd makefun-1.6.10
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ sed -r -i 's/'\''pandoc'\'', //' setup.py
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.y0iHDt
+ umask 022
+ cd /builddir/build/BUILD
+ cd makefun-1.6.10
+ echo python3-devel
+ echo 'python3dist(packaging)'
+ echo 'python3dist(pip) >= 19'
+ echo 'python3dist(pytoml)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ /usr/bin/python3 -I /usr/lib/rpm/redhat/pyproject_buildrequires.py
Handling setuptools >= 40.8 from default build backend
Requirement satisfied: setuptools >= 40.8
   (installed: setuptools 41.0.1)
Handling wheel from default build backend
Requirement satisfied: wheel
   (installed: wheel 0.33.1)
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    from setuptools_scm import get_version
ModuleNotFoundError: No module named 'setuptools_scm'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 241, in main
    extras=args.extras,
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 193, in generate_requires
    generate_build_requirements(backend, requirements)
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 157, in generate_build_requirements
    new_reqs = get_requires()
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 145, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 126, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 141, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 26, in <module>
    'them manually using conda or other system. The list is : ' + str(SETUP_REQUIRES)), e)
  File "<string>", line 3, in raise_from
Exception: Required packages for setup not found. You may wish you execute "pip install -r ci_tools/requirements-setup.txt" to install them or alternatively install them manually using conda or other system. The list is : ['pytest-runner', 'setuptools_scm', 'pypandoc', 'six']
python3-devel
python3dist(packaging)
python3dist(pip) >= 19
python3dist(pytoml)
python3dist(setuptools) >= 40.8
python3dist(wheel)
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.y0iHDt (%generate_buildrequires)
    Bad exit status from /var/tmp/rpm-tmp.y0iHDt (%generate_buildrequires)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 748, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 314bc3d5fae44452943fafc86a609b84 -D /var/lib/mock/fedora-rawhide-x86_64/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.lle62yzs:/etc/resolv.conf --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=en_GB.UTF-8 -u mockbuild bash --login -c /usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-makefun.spec

Mock Version: 1.4.17
---

I think setuptools_scm needs to be included in BR. It isn't being picked up by the automatic generator(s)---it is mentioned in setup.py, though.

Comment 6 Zbigniew Jędrzejewski-Szmek 2019-08-12 18:21:48 UTC
Patrik, could you take a look?

Comment 7 Miro Hrončok 2019-08-12 19:14:11 UTC
+ /usr/bin/python3 -I /usr/lib/rpm/redhat/pyproject_buildrequires.py
Handling setuptools >= 40.8 from default build backend
Requirement satisfied: setuptools >= 40.8
   (installed: setuptools 41.0.1)
Handling wheel from default build backend
Requirement satisfied: wheel
   (installed: wheel 0.33.1)


It seem the project has no pyproject.toml and hence the pyproject macros cannot know the setup dependencies before executing setup. Either add setuptools_scm to pyproject.toml or BR it manually before that happens.

Comment 8 Patrik Kopkan 2019-08-13 12:10:33 UTC
diff -Naur makefun-1.6.10.orig/pyproject.toml makefun-1.6.10/pyproject.toml
--- makefun-1.6.10.orig/pyproject.toml	1970-01-01 01:00:00.000000000 +0100
+++ makefun-1.6.10/pyproject.toml	2019-08-13 13:39:52.688122126 +0200
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools", "setuptools-scm", "wheel"]
+build-backend = "setuptools.build_meta"

I tried this patch adding pyproject.toml. Build still fails, will investigate.

INFO: mock.py version 1.4.17 starting (python version = 3.7.3)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(python-makefun-1.6.10-1.fc29.src.rpm)  Config(fedora-rawhide-x86_64)
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.17
INFO: Mock Version: 1.4.17
Finish: chroot init
Start: build phase for python-makefun-1.6.10-1.fc29.src.rpm
Start: build setup for python-makefun-1.6.10-1.fc29.src.rpm
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1565395200
Wrote: /builddir/build/SRPMS/python-makefun-1.6.10-1.fc31.src.rpm
fedora                                                                    37 kB/s |  19 kB     00:00    
Package pyproject-rpm-macros-0-4.fc31.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Finish: build setup for python-makefun-1.6.10-1.fc29.src.rpm
Start: rpmbuild python-makefun-1.6.10-1.fc29.src.rpm
Start: Outputting list of installed packages
Finish: Outputting list of installed packages
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1565395200
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.TUBPvu
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf makefun-1.6.10
+ /usr/bin/gzip -dc /builddir/build/SOURCES/makefun-1.6.10.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd makefun-1.6.10
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /builddir/build/SOURCES/pyproject.toml.patch
+ /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch
+ sed -r -i 's/'\''pandoc'\'', //' setup.py
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.oYCEIw
+ umask 022
+ cd /builddir/build/BUILD
+ cd makefun-1.6.10
+ echo python3-devel
+ echo 'python3dist(packaging)'
+ echo 'python3dist(pip) >= 19'
+ echo 'python3dist(pytoml)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ /usr/bin/python3 -I /usr/lib/rpm/redhat/pyproject_buildrequires.py -r
Handling setuptools from build-system.requires
Requirement satisfied: setuptools
   (installed: setuptools 41.0.1)
Handling setuptools-scm from build-system.requires
Requirement satisfied: setuptools-scm
   (installed: setuptools-scm 3.3.3)
Handling wheel from build-system.requires
Requirement satisfied: wheel
   (installed: wheel 0.33.1)
setup.py:46: DeprecationWarning: Due to possible ambiguity, 'convert()' is deprecated. Use 'convert_file()'  or 'convert_text()'.
  LONG_DESCRIPTION = pypandoc.convert(path.join(here, 'docs', 'long_description.md'), 'rst').replace('\r', '')
Handling wheel from get_requires_for_build_wheel
Requirement satisfied: wheel
   (installed: wheel 0.33.1)
Handling pytest-runner from get_requires_for_build_wheel
Handling setuptools_scm from get_requires_for_build_wheel
Handling pypandoc from get_requires_for_build_wheel
Requirement satisfied: pypandoc
   (installed: pypandoc 1.4)
Handling six from get_requires_for_build_wheel
Requirement satisfied: six
   (installed: six 1.12.0)
setup.py:46: DeprecationWarning: Due to possible ambiguity, 'convert()' is deprecated. Use 'convert_file()'  or 'convert_text()'.
  LONG_DESCRIPTION = pypandoc.convert(path.join(here, 'docs', 'long_description.md'), 'rst').replace('\r', '')
Download error on https://pypi.org/simple/pytest-runner/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for pytest-runner
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 241, in main
    extras=args.extras,
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 195, in generate_requires
    generate_run_requirements(backend, requirements)
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 169, in generate_run_requirements
    dir_basename = prepare_metadata('.')
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 155, in prepare_metadata_for_build_wheel
    self.run_setup()
  File "/usr/lib/python3.7/site-packages/setuptools/build_meta.py", line 141, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 136, in <module>
    extras_require=EXTRAS_REQUIRE,
  File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 784, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 678, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
python3-devel
python3dist(packaging)
python3dist(pip) >= 19
python3dist(pytoml)
python3dist(setuptools)
python3dist(setuptools-scm)
python3dist(wheel)
python3dist(wheel)
python3dist(pytest-runner)
python3dist(setuptools-scm)
python3dist(pypandoc)
python3dist(six)


RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.oYCEIw (%generate_buildrequires)
    Bad exit status from /var/tmp/rpm-tmp.oYCEIw (%generate_buildrequires)
ERROR: Exception(python-makefun-1.6.10-1.fc29.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 5 seconds
INFO: Results and/or logs in: /home/pkopkan/Documents/review/1739786-python-makefun/srpm-unpacked/result
ERROR: state finish mismatch: current: rpmbuild python-makefun-1.6.10-1.fc29.src.rpm, state: build phase for python-makefun-1.6.10-1.fc29.src.rpm

Comment 9 Petr Viktorin (pviktori) 2019-08-13 12:27:02 UTC
> There's also no mention of these macros in the python packaging guidelines---should we wait for them to be made public before using them?

They are currently experimental. If you use them, you should be prepared to follow the development and maybe adjust the package if we need to do any changes (though we'll try to not break stuff).


Anyway, you should put SETUP_REQUIRES in your pyproject.toml as well: ['pytest-runner', 'setuptools_scm', 'pypandoc', 'pandoc', 'six']
Unfortunately, setuptools needs to download code from the Internet to bootstrap and read the info from setup.py -- which isn't allowed in Fedora. It's one of the reasons for the move to pyproject.toml.

Comment 10 Ankur Sinha (FranciscoD) 2019-08-13 12:52:05 UTC
(In reply to Petr Viktorin from comment #9)
> > There's also no mention of these macros in the python packaging guidelines---should we wait for them to be made public before using them?
> 
> They are currently experimental. If you use them, you should be prepared to
> follow the development and maybe adjust the package if we need to do any
> changes (though we'll try to not break stuff).
> 

In this case, I think it is best to wait until they're announced to the whole community---as part of the Python packaging guidelines---before using them.


What do you think Zbigniew? We need to ensure that these specs remain consistent since all members of the neuro-sig (at least) would be looking after them.

I'm all for early adoption, but I do not think these are ready for adoption yet, especially since the review process also requires others to know how they are meant to be used. We may not mind keeping up with the changes to these macros, but it isn't fair to expect others to keep up with their development also.

(Additionally, the current set of python macros already makes the spec quite short and neat, so moving to these new ones doesn't seem too urgent to me.)

Comment 11 Ankur Sinha (FranciscoD) 2019-08-13 12:56:28 UTC
I forgot to add: 

So, if we can please remove these from the spec for the time being, we can get this review back on track. 

(Further discussion of these macros and their adoption should occur on the devel ML, probably via a Change announcement: https://fedoraproject.org/wiki/Changes/Policy similar to how the automated dep generators were announced: https://fedoraproject.org/wiki/Changes/EnablingPythonGenerators)

Comment 12 Robert-André Mauchin 🐧 2019-08-22 17:39:36 UTC
With Mock 1.4.17 and 

cat >pyproject.toml <<EOF
[build-system]
requires = ["pytest-runner", "setuptools_scm", "pypandoc", "six"]
build-backend = "setuptools.build_meta"
EOF





Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 3-clause "New" or "Revised"
     License", "*No copyright* BSD (unspecified)". 35 files have unknown
     license. Detailed output of licensecheck in
     /home/bob/packaging/review/python-makefun/review-python-
     makefun/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-makefun-1.6.10-1.fc32.noarch.rpm
          python-makefun-1.6.10-1.fc32.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.

Comment 13 Robert-André Mauchin 🐧 2019-08-22 17:41:58 UTC
You're missing the Python provide macros:


%package -n python3-makefun
Summary: %{summary}
%{?python_provide:%python_provide python3-makefun}

%description -n python3-makefun %_description

Comment 14 Ankur Sinha (FranciscoD) 2019-08-27 12:39:43 UTC
I've filed a ticket with the packaging committee discussing the use of these macros. Please wait till they make their suggestion:

https://pagure.io/packaging-committee/issue/918

Comment 15 Ankur Sinha (FranciscoD) 2019-09-12 15:36:51 UTC
We can proceed here---Miro said they'd make an announcement to -devel about the experimental macros.

Comment 16 Miro Hrončok 2019-09-12 16:24:23 UTC
I am waiting for new mock to be deployed on Koji.

Comment 17 Zbigniew Jędrzejewski-Szmek 2019-09-13 08:12:41 UTC
Thanks for all the discussion and sorry for the delay.

- update to latest version
- add .toml override
- add missing %python_provide

Spec URL: https://in.waw.pl/~zbyszek/fedora/python-makefun.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-makefun-1.6.11-1.fc32.src.rpm

Comment 18 Robert-André Mauchin 🐧 2019-09-23 21:43:55 UTC
Ping, ready to finish this review?

Comment 19 Ankur Sinha (FranciscoD) 2019-09-23 22:07:30 UTC
Low on cycles---will be done by next week. Please take it up if you have cycles, Robert.

Comment 20 Zbigniew Jędrzejewski-Szmek 2019-10-04 09:30:06 UTC
successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=38046960

Please give the ack.

Comment 21 Zbigniew Jędrzejewski-Szmek 2019-10-04 09:47:43 UTC
Thanks!

Comment 22 Gwyn Ciesla 2019-10-04 12:34:41 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-makefun


Note You need to log in before you can comment on or make changes to this bug.