Skip to content

Commit

Permalink
remove BITPRIM_BUILD_NUMBER envvar (#13)
Browse files Browse the repository at this point in the history
* remove BITPRIM_BUILD_NUMBER envvar

* dynamic import of Conan Packager
  • Loading branch information
fpelliccioni authored Jul 4, 2018
1 parent d6eaec2 commit a274311
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 25 deletions.
14 changes: 0 additions & 14 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@ test_script:
Write-Host $a
Invoke-Expression $a
- python ci_utils/print_version.py

- for /f %%i in ('python ci_utils/print_version.py') do set BITPRIM_BUILD_NUMBER=%%i
- set BITPRIM_CONAN_VERSION=%BITPRIM_BUILD_NUMBER%
- echo %BITPRIM_BUILD_NUMBER%
- echo %BITPRIM_CONAN_VERSION%

- ps: |
if ([System.IO.File]::Exists("conan_version")) {
Write-Host "Creating conan_version file"
$Env:BITPRIM_BUILD_NUMBER | Out-File conan_version
}
- python build.py


Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ script:
- |
if [[ "${CHECK_FORMATTING}" != "true" ]]; then
cd ${TRAVIS_BUILD_DIR}
ls -ltra ci_utils
chmod +x ci_utils/.travis/run.sh
./ci_utils/.travis/run.sh
fi
Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ set(WITH_SCALAR "auto" CACHE STRING "Specify scalar implementation (64bit|32bit|
set(WITH_BIGNUM "auto" CACHE STRING "Specify Bignum Implementation (gmp|mpir|no|auto).")


set(BITPRIM_BUILD_NUMBER "-" CACHE STRING "Specify the Bitprim Build Number.")
# message(${BITPRIM_BUILD_NUMBER})
set(BITPRIM_PROJECT_VERSION "-" CACHE STRING "Specify the Bitprim Project Version.")
# message(${BITPRIM_PROJECT_VERSION})

Expand Down Expand Up @@ -278,7 +276,6 @@ elseif (${WITH_BIGNUM} STREQUAL "no")
target_compile_definitions(secp256k1 PUBLIC -DUSE_SCALAR_INV_BUILTIN=1)
endif()

target_compile_definitions(secp256k1 PUBLIC -DBITPRIM_BUILD_NUMBER="\\"${BITPRIM_BUILD_NUMBER}\\"") #TODO(fernando): manage with Conan????
target_compile_definitions(secp256k1 PUBLIC -DBITPRIM_PROJECT_VERSION="\\"${BITPRIM_PROJECT_VERSION}\\"") #TODO(fernando): manage with Conan????
# message(CONAN_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion ci_utils
9 changes: 3 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ class Secp256k1Conan(ConanFile):
# "with_bignum='auto'"

generators = "cmake"
build_policy = "missing"

exports = "conan_*", "ci_utils/*" #"conan_channel", "conan_user", "conan_version", "conan_req_version"
exports = "conan_*", "ci_utils/*"
exports_sources = "src/*", "include/*", "CMakeLists.txt", "cmake/*", "secp256k1Config.cmake.in", "contrib/*", "test/*"
#, "bitprimbuildinfo.cmake"
build_policy = "missing"

# with_benchmark = False
# with_tests = True
Expand Down Expand Up @@ -174,7 +172,6 @@ def package_id(self):

def build(self):
cmake = CMake(self)

cmake.definitions["USE_CONAN"] = option_on_off(True)
cmake.definitions["NO_CONAN_AT_ALL"] = option_on_off(False)
cmake.verbose = self.options.verbose
Expand Down Expand Up @@ -209,6 +206,7 @@ def build(self):


cmake.definitions["MICROARCHITECTURE"] = self.options.microarchitecture
cmake.definitions["BITPRIM_PROJECT_VERSION"] = self.version

if self.settings.os == "Windows":
if self.settings.compiler == "Visual Studio" and (self.settings.compiler.version != 12):
Expand All @@ -228,7 +226,6 @@ def build(self):

pass_march_to_compiler(self, cmake)

cmake.definitions["BITPRIM_BUILD_NUMBER"] = os.getenv('BITPRIM_BUILD_NUMBER', '-')
cmake.configure(source_dir=self.source_folder)
cmake.build()

Expand Down

0 comments on commit a274311

Please sign in to comment.