Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62573 closed defect (fixed)

py37-flit @3.2.0: ERROR [Errno 2] No such file or directory

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: tobypeterson, jmroot (Joshua Root)
Port: py-flit

Description

https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/137060/steps/install-port/logs/stdio

pep517.build is deprecated. Consider switching to https://pypi.org/project/build/
WARNING /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/install/__init__.py:189 (InstallWarning) No module named 'packaging': Platform/Python tags were not verified for compatibility
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/install/__main__.py", line 128, in <module>
    install(cache_dir, args.destdir)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/install/__init__.py", line 284, in install
    _copy_dir(scripts_cache_dir, destdir_path('scripts'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/install/__init__.py", line 96, in _copy_dir
    shutil.copy2(path, root)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py", line 266, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-flit/py37-flit/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/flit'

ERROR [Errno 2] No such file or directory: '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-flit/py37-flit/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/flit'
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-flit/py37-flit/work/flit-3.2.0" && /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -m install --verbose /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-flit/py37-flit/work/flit-3.2.0-py3-none-any.whl --destdir /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-flit/py37-flit/work/destroot 
Exit code: 1

Change History (8)

comment:1 Changed 4 years ago by tobypeterson

I can repro. Strange, works fine with python 3.9

comment:2 Changed 4 years ago by tobypeterson

python-install does not function correctly on python <3.8 (on >=3.8, it uses shutil.copytree)

comment:3 Changed 4 years ago by tobypeterson

Owner: set to tobypeterson
Resolution: fixed
Status: newclosed

In 03493367c18a0e76ea36eab24cd103c16a6aa51c/macports-ports (master):

py-python-install: fix _copy_dir behavior for older pythons. Fixes #62573

comment:4 Changed 4 years ago by jmroot (Joshua Root)

Do you want to do a PR upstream?

comment:5 Changed 4 years ago by tobypeterson

Kinda wondering if that project is even maintained now. Looks like pep517 is deprecated already (recommending "build" instead), so perhaps we need to find a new wheel installer (or maybe pip suits our needs now?)

comment:6 Changed 4 years ago by tobypeterson

Note, the fix I made just unbreaks flit's build. It's still installed incorrectly; the flit script isn't executable. So python-install has some pretty major bugs.

comment:7 Changed 4 years ago by jmroot (Joshua Root)

Cc: jmroot added

Probably the wrong place for this discussion, but they deprecated pep517.build before there was a mature enough replacement. Switching to build is probably doable (if it doesn't introduce yet more bugs), though it requires several more dependencies. Pip is still totally unsuitable, and python-install was created as a response to that. I certainly hope it's not abandoned.

comment:8 Changed 4 years ago by tobypeterson

Yeah, I have no particular reason to think python-install is abandoned; just wondering if it has any staying power. No changes in four months, and seemingly very little interest (9 stars on github).

Note: See TracTickets for help on using tickets.