mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-02 03:44:27 +02:00
style: conanfile.py reformatted
This commit is contained in:
21
conanfile.py
21
conanfile.py
@@ -28,11 +28,24 @@ import os, re
|
|||||||
|
|
||||||
required_conan_version = ">=1.44.0"
|
required_conan_version = ">=1.44.0"
|
||||||
|
|
||||||
|
|
||||||
class MPUnitsConan(ConanFile):
|
class MPUnitsConan(ConanFile):
|
||||||
name = "mp-units"
|
name = "mp-units"
|
||||||
homepage = "https://github.com/mpusz/units"
|
homepage = "https://github.com/mpusz/units"
|
||||||
description = "Physical Units library for C++"
|
description = "Physical Units library for C++"
|
||||||
topics = ("units", "dimensions", "quantities", "dimensional-analysis", "physical-quantities", "physical-units", "system-of-units", "cpp23", "cpp20", "library", "quantity-manipulation")
|
topics = (
|
||||||
|
"units",
|
||||||
|
"dimensions",
|
||||||
|
"quantities",
|
||||||
|
"dimensional-analysis",
|
||||||
|
"physical-quantities",
|
||||||
|
"physical-units",
|
||||||
|
"system-of-units",
|
||||||
|
"cpp23",
|
||||||
|
"cpp20",
|
||||||
|
"library",
|
||||||
|
"quantity-manipulation",
|
||||||
|
)
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
url = "https://github.com/mpusz/units"
|
url = "https://github.com/mpusz/units"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
@@ -48,7 +61,7 @@ class MPUnitsConan(ConanFile):
|
|||||||
"build_docs": True
|
"build_docs": True
|
||||||
}
|
}
|
||||||
exports = ["LICENSE.md"]
|
exports = ["LICENSE.md"]
|
||||||
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*", "CMakeLists.txt"]
|
||||||
generators = "cmake_paths"
|
generators = "cmake_paths"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -68,12 +81,12 @@ class MPUnitsConan(ConanFile):
|
|||||||
def _use_range_v3(self):
|
def _use_range_v3(self):
|
||||||
compiler = self.settings.compiler
|
compiler = self.settings.compiler
|
||||||
version = Version(self.settings.compiler.version)
|
version = Version(self.settings.compiler.version)
|
||||||
return ("clang" in compiler and compiler.libcxx == "libc++" and version < 14)
|
return "clang" in compiler and compiler.libcxx == "libc++" and version < 14
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _msvc_version(self):
|
def _msvc_version(self):
|
||||||
compiler = self.settings.compiler
|
compiler = self.settings.compiler
|
||||||
if (compiler.update):
|
if compiler.update:
|
||||||
return int(f"{compiler.version}{compiler.update}")
|
return int(f"{compiler.version}{compiler.update}")
|
||||||
else:
|
else:
|
||||||
return int(f"{compiler.version}0")
|
return int(f"{compiler.version}0")
|
||||||
|
Reference in New Issue
Block a user