Open tomaso909 opened 4 years ago
I had the same error occur in python's distutils/cygwinccompiler.py. The function get_version() tries to get the gcc version number by using the flag -dumpversion, but gcc-7 changed the behavior of this flag to only output the major version number. I added the flag -dumpfullversion on line 399 in cygwincompiler.py and it fixed the error.
commands = ['gcc -dumpfullversion -dumpversion', 'ld -v', 'dllwrap --version']
Unfortunately I get another error, which I haven't managed to get around yet
python -m pip install xfoil
Defaulting to user installation because normal site-packages is not writeable
Collecting xfoil
Using cached xfoil-1.1.1.tar.gz (12 kB)
Requirement already satisfied: numpy in ./.local/lib/python3.6/site-packages (from xfoil) (1.18.1)
Building wheels for collected packages: xfoil
Building wheel for xfoil (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-885y_noq
cwd: /tmp/pip-install-nceell5q/xfoil/
Complete output (49 lines):
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'zip_save'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/xfoil
copying xfoil/xfoil.py -> build/lib.linux-x86_64-3.6/xfoil
copying xfoil/__init__.py -> build/lib.linux-x86_64-3.6/xfoil
copying xfoil/model.py -> build/lib.linux-x86_64-3.6/xfoil
copying xfoil/test.py -> build/lib.linux-x86_64-3.6/xfoil
running build_ext
['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']
CMake Error: The source directory "/tmp/pip-install-nceell5q/xfoil" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 149, in <module>
zip_save=False
File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/dist-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 110, in build_extensions
cwd=self.build_temp)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-nceell5q/xfoil', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for xfoil
Running setup.py clean for xfoil
Failed to build xfoil
Installing collected packages: xfoil
Running setup.py install for xfoil ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hn1518io/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/matteo/.local/include/python3.6m/xfoil
cwd: /tmp/pip-install-nceell5q/xfoil/
Complete output (51 lines):
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'zip_save'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/xfoil
copying xfoil/xfoil.py -> build/lib.linux-x86_64-3.6/xfoil
copying xfoil/__init__.py -> build/lib.linux-x86_64-3.6/xfoil
copying xfoil/model.py -> build/lib.linux-x86_64-3.6/xfoil
copying xfoil/test.py -> build/lib.linux-x86_64-3.6/xfoil
running build_ext
['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']
CMake Error: The source directory "/tmp/pip-install-nceell5q/xfoil" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 149, in <module>
zip_save=False
File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/dist-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 110, in build_extensions
cwd=self.build_temp)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-nceell5q/xfoil', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hn1518io/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/matteo/.local/include/python3.6m/xfoil Check the logs for full command output.
Using pip 20.1 instead of 20.1.1 solved this for me (I did pip install pip==20.1
within my venv). Not sure why though.
The development has now moved to https://codeberg.org/xfoil-python/xfoil-python/ (see #21).
There is a pull request, which solves this problem: https://codeberg.org/xfoil-python/xfoil-python/pulls/27 adds MANIFEST.in
with this contents:
include CMakeLists.txt
include src/*
Now python3 setup.py sdist
includes this missing files in the archive used to install it.
Note, that this is not (yet) available on PyPi.
I'm trying to install on Linux but I get the following error:
I have gfortran and gcc available on the PATH. I'm using Python 3.8.3: