-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting on windows #149
base: main
Are you sure you want to change the base?
Starting on windows #149
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
data/ | ||
settings/.conan.db | ||
settings/cacert.pem | ||
settings/artifacts.properties | ||
settings_*/.conan.db | ||
settings_*/cacert.pem | ||
settings_*/artifacts.properties | ||
ccache/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from platform import system | ||
from conans import AutoToolsBuildEnvironment, ConanFile, tools | ||
from contextlib import contextmanager | ||
import os | ||
|
@@ -47,23 +48,23 @@ def export_sources(self): | |
def _build_context(self): | ||
if self.settings.compiler == "Visual Studio": | ||
with tools.vcvars(self.settings): | ||
env = { | ||
"AR": "{} lib".format( | ||
tools.unix_path(self.deps_user_info["automake"].ar_lib) | ||
), | ||
"CC": "{} cl -nologo".format( | ||
tools.unix_path(self.deps_user_info["automake"].compile) | ||
), | ||
"CXX": "{} cl -nologo".format( | ||
tools.unix_path(self.deps_user_info["automake"].compile) | ||
), | ||
"NM": "dumpbin -symbols", | ||
"OBJDUMP": ":", | ||
"RANLIB": ":", | ||
"STRIP": ":", | ||
} | ||
with tools.environment_append(env): | ||
yield | ||
# env = { | ||
# "AR": "{} lib".format( | ||
# tools.unix_path(self.deps_user_info["automake"].ar_lib) | ||
# ), | ||
# "CC": "{} cl -nologo".format( | ||
# tools.unix_path(self.deps_user_info["automake"].compile) | ||
# ), | ||
# "CXX": "{} cl -nologo".format( | ||
# tools.unix_path(self.deps_user_info["automake"].compile) | ||
# ), | ||
# "NM": "dumpbin -symbols", | ||
# "OBJDUMP": ":", | ||
# "RANLIB": ":", | ||
# "STRIP": ":", | ||
# } | ||
# with tools.environment_append(env): | ||
yield | ||
else: | ||
yield | ||
|
||
|
@@ -92,19 +93,26 @@ def _configure_autotools(self): | |
return self._autotools | ||
|
||
def build(self): | ||
with self._build_context(): | ||
autotools = self._configure_autotools() | ||
autotools.make() | ||
if system() == "Linux": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. match / case when when we switch to Python 3.10 and support Darwin/macOS |
||
with self._build_context(): | ||
autotools = self._configure_autotools() | ||
autotools.make() | ||
else: | ||
self.run( | ||
os.path.join(self._source_subfolder, "PCbuild", "build.bat"), | ||
run_environment=True, | ||
) | ||
|
||
def package(self): | ||
self.copy("COPYING", src=self._source_subfolder, dst="licenses") | ||
|
||
self.copy("yum", dst="bin") | ||
self.copy("run-with-system-python", dst="bin") | ||
if system() == "Linux": | ||
self.copy("yum", dst="bin") | ||
self.copy("run-with-system-python", dst="bin") | ||
|
||
with self._build_context(): | ||
autotools = self._configure_autotools() | ||
autotools.install() | ||
with self._build_context(): | ||
autotools = self._configure_autotools() | ||
autotools.install() | ||
|
||
python_version = tools.Version(self.version) | ||
if python_version.major == "3": | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[log] | ||
run_to_output = True # environment CONAN_LOG_RUN_TO_OUTPUT | ||
run_to_file = False # environment CONAN_LOG_RUN_TO_FILE | ||
level = critical # environment CONAN_LOGGING_LEVEL | ||
print_run_commands = False # environment CONAN_PRINT_RUN_COMMANDS | ||
|
||
[general] | ||
revisions_enabled = 1 | ||
default_profile = vfx2022 | ||
compression_level = 9 # environment CONAN_COMPRESSION_LEVEL | ||
sysrequires_sudo = True # environment CONAN_SYSREQUIRES_SUDO | ||
request_timeout = 60 # environment CONAN_REQUEST_TIMEOUT (seconds) | ||
default_package_id_mode = semver_direct_mode # environment CONAN_DEFAULT_PACKAGE_ID_MODE | ||
|
||
[storage] | ||
path = ../d | ||
download_cache = /tmp/downloads | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That looks like a Linux-specific path? |
||
|
||
[proxies] | ||
|
||
[hooks] | ||
attribute_checker | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def pre_export(output, conanfile, conanfile_path, reference, **kwargs): | ||
# Check basic meta-data | ||
for field in ["url", "license", "description"]: | ||
field_value = getattr(conanfile, field, None) | ||
if not field_value: | ||
output.warn( | ||
"Conanfile doesn't have '%s'. It is recommended to add it as attribute" | ||
% field | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[settings] | ||
os=Windows | ||
os_build=Windows | ||
arch=x86_64 | ||
arch_build=x86_64 | ||
compiler=visual_studio | ||
compiler.version=15 | ||
compiler.toolset=v141 | ||
compiler.cppstd=14 | ||
build_type=Release | ||
[options] | ||
[build_requires] | ||
[env] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[settings] | ||
os=Windows | ||
os_build=Windows | ||
arch=x86_64 | ||
arch_build=x86_64 | ||
compiler=Visual Studio | ||
compiler.version=15 | ||
compiler.toolset=v141 | ||
compiler.cppstd=14 | ||
build_type=Release | ||
[options] | ||
[build_requires] | ||
[env] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include(ci_common1) | ||
|
||
[settings] | ||
python=2.7 | ||
[options] | ||
[build_requires] | ||
[env] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include(ci_common1) | ||
|
||
[settings] | ||
python=3.7 | ||
[options] | ||
[build_requires] | ||
[env] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include(ci_common2) | ||
|
||
[settings] | ||
python=3.7 | ||
[options] | ||
[build_requires] | ||
[env] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include(ci_common2) | ||
|
||
[settings] | ||
python=3.9 | ||
[options] | ||
[build_requires] | ||
[env] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"remotes": [ | ||
{ | ||
"name": "aswf", | ||
"url": "https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan", | ||
"verify_ssl": true | ||
}, | ||
{ | ||
"name": "conan-central", | ||
"url": "https://center.conan.io", | ||
"verify_ssl": true | ||
}, | ||
{ | ||
"name": "aswftesting", | ||
"url": "https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan-dev", | ||
"verify_ssl": true | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May end up being:
and platform.system() != "Windows"