BrianGladman / mpir

Multiple Precision Integers and Rationals
GNU General Public License v3.0
75 stars 36 forks source link

mpir_config.py syntax error #24

Closed LeslieGreenCEngMIEE closed 2 years ago

LeslieGreenCEngMIEE commented 2 years ago

Cloned MPIR to a fresh directory.

mpir_config.py shows a syntax error when mpir_config.sln opened in VS2015 under Win10.

write_f(join(build_root_dir, f'version_info{vs_version}.py'), join(solution_dir, 'version_info.py'))

It is unclear where the extra "f" in front of the version_info came from.

Deleting the excess f and changing the hard_coded vs_version from 22 to 15 allows the config to run as expected. The tests then run and pass for a Release x64 DLL build.

BrianGladman commented 2 years ago

"f-strings' were introduced in Python 3.6 in late 2016 so it seems that you are using an earlier version of Python. If you update your version of Python, mpir_config.py should work for VS2015 without the need for any modifications.

LeslieGreenCEngMIEE commented 2 years ago

Excellent. Thanks for the quick response.

Visual Studio 2015 supports only Python 3.5 and earlier; later versions generate a message like Unsupported Python version 3.6)

That quote is from a Microsoft doc found by google, but when you click on the link given it doesn't have the vs2015 info any more. I installed a Python 3.5 version in order to work with vs2015.

BrianGladman commented 2 years ago

Technically I only support the two latest versions of Visual Studio but, as you found, only minor modifications are needed to get it to work with older versions.

LeslieGreenCEngMIEE commented 2 years ago

MPIR Support Note: Repository code no longer fully supports Visual Studio 2013 and Visual Studio 2015, despite sub-folders existing for them in the msvc folder. In general, only the two latest versions of Visual Studio are used to verify new code, but old legacy versions are retained in case they still have some value. (You should appreciate that supporting five or more variants of Visual Studio is an unreasonable workload on a volunteer workforce, especially given the marginal benefit to users!)