Fixing distro deprecation in setup.py and failing installation on pure Debian (#6802)

* Fixed distro deprecation, failing on Debian

* Updated CHANELOG.md for distro deprecation

* Update setup.py

Substituted double occurring list.

---------

Co-authored-by: Daniel@copernicus <daniel.sperber@mail.uni-mannheim.de>
This commit is contained in:
Daraan 2024-03-18 10:41:05 +01:00 committed by GitHub
parent 3eb9a76263
commit 7c9233bb54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -39,6 +39,8 @@
* Fixed bug causing the `FPixelReader::SavePixelsToDisk(PixelData, FilePath)` function to crash due to pixel array not set correctly.
* Fixed segfaults in Python API due to incorrect GIL locking under Python 3.10.
* Fixed the import script, where could use any other TilesInfo.txt if the destination folder has many
* Fixed PythonAPI not installing on Debian due to deprecated function of distro in setup.py. Less ambiguous error for other posix platforms.
## CARLA 0.9.14

View File

@ -33,9 +33,10 @@ def get_libcarla_extensions():
if os.name == "posix":
import distro
linux_distro = distro.linux_distribution()[0]
if linux_distro.lower() in ["ubuntu", "debian", "deepin"]:
supported_dists = ["ubuntu", "debian", "deepin"]
linux_distro = distro.id().lower()
if linux_distro in supported_dists:
pwd = os.path.dirname(os.path.realpath(__file__))
pylib = "libboost_python%d%d.a" % (sys.version_info.major,
sys.version_info.minor)
@ -101,7 +102,7 @@ def get_libcarla_extensions():
# extra_link_args += ['/usr/lib/gcc/x86_64-linux-gnu/7/libstdc++.a']
extra_link_args += ['-lstdc++']
else:
raise NotImplementedError
raise NotImplementedError(linux_distro + " not in supported posix platforms: " + str(supported_dists))
elif os.name == "nt":
pwd = os.path.dirname(os.path.realpath(__file__))
pylib = 'libboost_python%d%d' % (