Closed kwvg closed 3 years ago
One minor issue with this - on my MinGW environment in Windows os.WEXITSTATUS is not recognised.
Mike
On Thu, Jun 24, 2021 at 6:36 PM Kittywhiskers Van Gogh < @.***> wrote:
The original behavior of ./config64.py and ./config64.py test have not been modified (with the exception of fast-failing being enabled by default now, presuming ./config64.py test is used in a CI environment) What this PR implements
- Removing delete_file calls, I noticed it was added back but it came back to wreck my local repo's state and removing them didn't seem to affect builds
- The C variant can now respect CFLAGSand CC and the C++ variant can now respect CXXFLAGSand CXX, there a flag to disable it
- Introduction of fast-failing. If the compilation of a file fails, the whole script should fail. Previously the script would return 0 regardless of internal state, this has been rectified.
- Introduction of non-interactive builds, so that it can be integrated into other build systems that use Miracl Core as a dependency
- For those who want the laxer restrictions placed by ./config64.py test, you can now execute ./config64.py --run-tests
Usage: ./config64.py [OPTIONS] [ARGUMENTS]
Option Long Option Action
-h, -? --help Shows this message
Script Behaviour:
-d --disable-fastfail Disable script termination if build fails (default: false)
-i --ignore-environment Do not read environment variables, rely on shell instead (default: false)
Build Configuration:
-o --options=1 --options=64 Disable interactive mode and select specific options
-r --run-tests Disable interactive mode, select all options, build and run tests
(implies --disable-fastfail, --ignore-environment)
Cheers! 🍻
You can view, comment on, or merge this pull request online at:
https://github.com/miracl/core/pull/48 Commit Summary
- Remove excessive delete_file calls, only delete generated files
- Move all indent 0 logic to dedicated main() function
- Shift minimum core library files to tuple, use loop
- Add new flag that terminates script if compile error found
- Add the ability to accept CC and CFLAGS
- Add the ability to build relatively silently, pass arguments
File Changes
- M c/config64.py https://github.com/miracl/core/pull/48/files#diff-0827d47895ad1e9ff42fc1f48090863bd87b7793c88a8b16616e68f5d4e47837 (281)
- M cpp/config64.py https://github.com/miracl/core/pull/48/files#diff-79d52f24c1b874763ea6a52facb1009a920a3f5c1fcd9c0f0265785d363ea7f6 (300)
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/miracl/core/pull/48, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU3ZDWN2HRRO6VDPUJRSX3TUNULLANCNFSM47IKT62Q .
A comment on an answer on Stack Exchange might explain that behavior.
In Windows the exit code of the process should be returned directly, but I'm afraid that you are getting the Linux exit code conversion anyway (cygwin, mingw, or something like that in the way).
According to the Python docs for os.waitstatus_to_exitcode
, something that somewhat relies on WEXITSTATUS()
, it appears to support Windows.
Also to note, while os.WEXITSTATUS
is marked as "Availability: Unix", they add a disclaimer on this page about what that exactly means
An “Availability: Unix” note means that this function is commonly found on Unix systems. It does not make any claims about its existence on a specific operating system.
The original behavior of
./config64.py
and./config64.py test
have not been modified (with the exception of fast-failing being enabled by default now, presuming./config64.py test
is used in a CI environment)What this PR implements
delete_file
calls, I noticed it was added back but it came back to wreck my local repo's state and removing them didn't seem to affect buildsCFLAGS
andCC
and the C++ variant can now respectCXXFLAGS
andCXX
, there a flag to disable it./config64.py test
, you can now execute./config64.py --run-tests
Cheers! 🍻