Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.7.0: issue with installing pecan .whl archive #182

Closed
wuch-g2v opened this issue Apr 22, 2023 · 1 comment
Closed

0.7.0: issue with installing pecan .whl archive #182

wuch-g2v opened this issue Apr 22, 2023 · 1 comment
Labels
component: core Related to core installation logic resolution: noaction A suggested feature or task that has been decided not to pursue

Comments

@wuch-g2v
Copy link

wuch-g2v commented Apr 22, 2023

Looks like something is wrong with installer. On installing .whl archive generated using pep571 build prcedure it complains that /usr/bin/pecan wrapper sript already exist.
Here is rpmm %install procedure log

Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.JbqY5K
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ '[' /home/tkloczko/rpmbuild/BUILDROOT/python-pecan-1.4.2-4.fc35.x86_64 '!=' / ']'
+ rm -rf /home/tkloczko/rpmbuild/BUILDROOT/python-pecan-1.4.2-4.fc35.x86_64
++ dirname /home/tkloczko/rpmbuild/BUILDROOT/python-pecan-1.4.2-4.fc35.x86_64
+ /usr/bin/mkdir -p /home/tkloczko/rpmbuild/BUILDROOT
+ /usr/bin/mkdir /home/tkloczko/rpmbuild/BUILDROOT/python-pecan-1.4.2-4.fc35.x86_64
+ ASMFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-c
+ CFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
+ CXXFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-c
+ FFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
+ FCFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc
+ LDFLAGS='-Wl,--gc-sections -Wl,--as-needed -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1'
+ RUSTFLAGS='-C codegen-units=1 -C debuginfo=2 -C opt-level=2 -C link-arg=-fdata-sections -C link-arg=-ffunction-sections -C link-arg=-Wl,--as-needed -C link-arg=-Wl,-z,now -C link-arg=-Wl,
+ VALAFLAGS=-g
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export ASMFLAGS CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS VALAFLAGS CC CXX FC AR NM RANLIB RUSTFLAGS VALAFLAGS
+ cd pecan-1.4.2
+ /usr/bin/python3 -sBm installer dist/pecan-1.4.2-py3-none-any.whl --destdir /home/tkloczko/rpmbuild/BUILDROOT/python-pecan-1.4.2-4.fc35.x86_64
Traceback (most recent call last):
  File "/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.8/site-packages/installer/__main__.py", line 98, in <module>
    _main(sys.argv[1:], "python -m installer")
  File "/usr/lib/python3.8/site-packages/installer/__main__.py", line 94, in _main
    installer.install(source, destination, {})
  File "/usr/lib/python3.8/site-packages/installer/_core.py", line 109, in install
    record = destination.write_file(
  File "/usr/lib/python3.8/site-packages/installer/destinations.py", line 203, in write_file
    return self.write_to_fs(
  File "/usr/lib/python3.8/site-packages/installer/destinations.py", line 167, in write_to_fs
    raise FileExistsError(message)
FileExistsError: File already exists: /home/tkloczko/rpmbuild/BUILDROOT/python-pecan-1.4.2-4.fc35.x86_64/usr/bin/pecan

As you see before start install destdir is removed and in %install only step is .whl archove installation.

Content of the .whl archive

[tkloczko@pers-jacek dist]$ unzip -l pecan-1.4.2-py3-none-any.whl
Archive:  pecan-1.4.2-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     5028  06-29-2022 16:13   pecan/__init__.py
     7419  06-29-2022 16:13   pecan/configuration.py
    32396  06-29-2022 16:13   pecan/core.py
     5875  06-29-2022 16:13   pecan/decorators.py
      182  06-29-2022 16:13   pecan/deploy.py
     2573  06-29-2022 16:13   pecan/extensions.py
    12814  06-29-2022 16:13   pecan/hooks.py
     4738  06-29-2022 16:13   pecan/jsonify.py
     1670  06-29-2022 16:13   pecan/log.py
    15457  06-29-2022 16:13   pecan/rest.py
    11633  06-29-2022 16:13   pecan/routing.py
     7242  06-29-2022 16:13   pecan/secure.py
     8391  06-29-2022 16:13   pecan/templating.py
     1711  06-29-2022 16:13   pecan/testing.py
     1540  06-29-2022 16:13   pecan/util.py
      175  06-29-2022 16:13   pecan/commands/__init__.py
     4720  06-29-2022 16:13   pecan/commands/base.py
     1656  06-29-2022 16:13   pecan/commands/create.py
     6827  06-29-2022 16:13   pecan/commands/serve.py
     5517  06-29-2022 16:13   pecan/commands/shell.py
      917  06-29-2022 16:13   pecan/compat/__init__.py
      133  06-29-2022 16:13   pecan/ext/__init__.py
       73  06-29-2022 16:13   pecan/middleware/__init__.py
     3025  06-29-2022 16:13   pecan/middleware/debug.py
     2531  06-29-2022 16:13   pecan/middleware/errordocument.py
     6948  06-29-2022 16:13   pecan/middleware/recursive.py
     5654  06-29-2022 16:13   pecan/middleware/static.py
     4181  06-29-2022 16:13   pecan/scaffolds/__init__.py
       27  06-29-2022 16:13   pecan/scaffolds/base/MANIFEST.in
     1490  06-29-2022 16:13   pecan/scaffolds/base/config.py_tmpl
       92  06-29-2022 16:13   pecan/scaffolds/base/setup.cfg_tmpl
      490  06-29-2022 16:13   pecan/scaffolds/base/setup.py_tmpl
        0  06-29-2022 16:13   pecan/scaffolds/base/+package+/__init__.py
      262  06-29-2022 16:13   pecan/scaffolds/base/+package+/app.py_tmpl
        0  06-29-2022 16:13   pecan/scaffolds/base/+package+/controllers/__init__.py
      629  06-29-2022 16:13   pecan/scaffolds/base/+package+/controllers/root.py
      463  06-29-2022 16:13   pecan/scaffolds/base/+package+/model/__init__.py
      273  06-29-2022 16:13   pecan/scaffolds/base/+package+/templates/error.html
      865  06-29-2022 16:13   pecan/scaffolds/base/+package+/templates/index.html
      448  06-29-2022 16:13   pecan/scaffolds/base/+package+/templates/layout.html
      518  06-29-2022 16:13   pecan/scaffolds/base/+package+/tests/__init__.py_tmpl
      563  06-29-2022 16:13   pecan/scaffolds/base/+package+/tests/config.py_tmpl
      691  06-29-2022 16:13   pecan/scaffolds/base/+package+/tests/test_functional.py_tmpl
      113  06-29-2022 16:13   pecan/scaffolds/base/+package+/tests/test_units.py
      569  06-29-2022 16:13   pecan/scaffolds/base/public/css/style.css
    20596  06-29-2022 16:13   pecan/scaffolds/base/public/images/logo.png
     1311  06-29-2022 16:13   pecan/scaffolds/rest-api/config.py_tmpl
       92  06-29-2022 16:13   pecan/scaffolds/rest-api/setup.cfg_tmpl
      490  06-29-2022 16:13   pecan/scaffolds/rest-api/setup.py_tmpl
        0  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/__init__.py
      339  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/app.py_tmpl
      496  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/errors.py
        0  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/controllers/__init__.py
     1085  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/controllers/root.py
      463  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/model/__init__.py
      518  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/tests/__init__.py_tmpl
      384  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/tests/config.py_tmpl
     1174  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/tests/test_functional.py_tmpl
      113  06-29-2022 16:13   pecan/scaffolds/rest-api/+package+/tests/test_units.py
      197  06-29-2022 16:13   pecan/tests/__init__.py
     4495  06-29-2022 16:13   pecan/tests/scaffold_builder.py
    74202  06-29-2022 16:13   pecan/tests/test_base.py
     1611  06-29-2022 16:13   pecan/tests/test_commands.py
    12826  06-29-2022 16:13   pecan/tests/test_conf.py
     2900  06-29-2022 16:13   pecan/tests/test_generic.py
    51703  06-29-2022 16:13   pecan/tests/test_hooks.py
     6529  06-29-2022 16:13   pecan/tests/test_jsonify.py
    50004  06-29-2022 16:13   pecan/tests/test_no_thread_locals.py
    45765  06-29-2022 16:13   pecan/tests/test_rest.py
     5210  06-29-2022 16:13   pecan/tests/test_scaffolds.py
    17809  06-29-2022 16:13   pecan/tests/test_secure.py
     1449  06-29-2022 16:13   pecan/tests/test_templating.py
     4239  06-29-2022 16:13   pecan/tests/test_util.py
      439  06-29-2022 16:13   pecan/tests/config_fixtures/config.py
       21  06-29-2022 16:13   pecan/tests/config_fixtures/empty.py
       12  06-29-2022 16:13   pecan/tests/config_fixtures/foobar.py
      338  06-29-2022 16:13   pecan/tests/config_fixtures/forcedict.py
       36  06-29-2022 16:13   pecan/tests/config_fixtures/bad/importerror.py
       48  06-29-2022 16:13   pecan/tests/config_fixtures/bad/module_and_underscore.py
        0  06-29-2022 16:13   pecan/tests/middleware/__init__.py
     3006  06-29-2022 16:13   pecan/tests/middleware/test_errordocument.py
     5532  06-29-2022 16:13   pecan/tests/middleware/test_recursive.py
     2390  06-29-2022 16:13   pecan/tests/middleware/test_static.py
     6976  06-29-2022 16:13   pecan/tests/middleware/static_fixtures/self.png
      473  06-29-2022 16:13   pecan/tests/middleware/static_fixtures/text.txt
        0  06-29-2022 16:13   pecan/tests/scaffold_fixtures/__init__.py
       15  06-29-2022 16:13   pecan/tests/scaffold_fixtures/content_sub/foo_tmpl
       17  06-29-2022 16:13   pecan/tests/scaffold_fixtures/content_sub/bar/spam.txt_tmpl
        4  06-29-2022 16:13   pecan/tests/scaffold_fixtures/file_sub/foo_+package+
        6  06-29-2022 16:13   pecan/tests/scaffold_fixtures/file_sub/bar_+package+/spam.txt
        4  06-29-2022 16:13   pecan/tests/scaffold_fixtures/simple/foo
        6  06-29-2022 16:13   pecan/tests/scaffold_fixtures/simple/bar/spam.txt
        0  06-29-2022 16:13   pecan/tests/templates/__init__.py
      207  06-29-2022 16:13   pecan/tests/templates/form_colors.html
      139  06-29-2022 16:13   pecan/tests/templates/form_colors_invalid.html
      128  06-29-2022 16:13   pecan/tests/templates/form_colors_valid.html
      143  06-29-2022 16:13   pecan/tests/templates/form_login_invalid.html
      116  06-29-2022 16:13   pecan/tests/templates/form_login_valid.html
       75  06-29-2022 16:13   pecan/tests/templates/form_name.html
      147  06-29-2022 16:13   pecan/tests/templates/form_name_invalid.html
      152  06-29-2022 16:13   pecan/tests/templates/form_name_invalid_custom.html
       57  06-29-2022 16:13   pecan/tests/templates/form_name_valid.html
      472  06-29-2022 16:13   pecan/tests/templates/genshi.html
      518  06-29-2022 16:13   pecan/tests/templates/genshi_bad.html
      115  06-29-2022 16:13   pecan/tests/templates/jinja.html
      163  06-29-2022 16:13   pecan/tests/templates/jinja_bad.html
      109  06-29-2022 16:13   pecan/tests/templates/kajiki.html
      108  06-29-2022 16:13   pecan/tests/templates/mako.html
       46  06-29-2022 16:13   pecan/tests/templates/mako_bad.html
      122  04-19-2023 16:07   pecan-1.4.2.data/scripts/pecan
      262  04-19-2023 16:07   pecan-1.4.2.dist-info/AUTHORS
     1505  04-19-2023 16:07   pecan-1.4.2.dist-info/LICENSE
     1389  04-19-2023 16:07   pecan-1.4.2.dist-info/METADATA
       92  04-19-2023 16:07   pecan-1.4.2.dist-info/WHEEL
      350  04-19-2023 16:07   pecan-1.4.2.dist-info/entry_points.txt
        6  04-19-2023 16:07   pecan-1.4.2.dist-info/top_level.txt
    10695  04-19-2023 16:07   pecan-1.4.2.dist-info/RECORD
---------                     -------
   510958                     117 files
@pradyunsg
Copy link
Member

pradyunsg commented May 3, 2023

See #170 (comment) for context in why this wheel should be considered incorrect and not this project's functionality.

@pradyunsg pradyunsg added resolution: noaction A suggested feature or task that has been decided not to pursue component: core Related to core installation logic labels May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core Related to core installation logic resolution: noaction A suggested feature or task that has been decided not to pursue
Projects
None yet
Development

No branches or pull requests

2 participants