-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
166 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
set -e -x | ||
|
||
GMP_VERSION=6.3.0 | ||
MPFR_VERSION=4.2.1 | ||
MPC_VERSION=1.3.1 | ||
|
||
PREFIX="$(pwd)/.local/" | ||
|
||
# -- build GMP -- | ||
curl -s -O https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.xz | ||
tar -xf gmp-${GMP_VERSION}.tar.xz | ||
cd gmp-${GMP_VERSION} | ||
# config.guess uses microarchitecture and configfsf.guess doesn't | ||
# We replace config.guess with configfsf.guess to avoid microarchitecture | ||
# specific code in common code. | ||
rm config.guess && mv configfsf.guess config.guess && chmod +x config.guess | ||
./configure --enable-fat \ | ||
--enable-shared \ | ||
--disable-static \ | ||
--prefix=$PREFIX | ||
make -j6 | ||
make install | ||
cd ../ | ||
|
||
# -- build MPFR -- | ||
curl -s -O https://ftp.gnu.org/gnu/mpfr/mpfr-${MPFR_VERSION}.tar.gz | ||
tar -xf mpfr-${MPFR_VERSION}.tar.gz | ||
cd mpfr-${MPFR_VERSION} | ||
./configure --enable-shared \ | ||
--disable-static \ | ||
--with-gmp=$PREFIX \ | ||
--prefix=$PREFIX | ||
make -j6 | ||
make install | ||
cd ../ | ||
# -- build MPC -- | ||
curl -s -O https://ftp.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz | ||
tar -xf mpc-${MPC_VERSION}.tar.gz | ||
cd mpc-${MPC_VERSION} | ||
./configure --enable-shared \ | ||
--disable-static \ | ||
--with-gmp=$PREFIX \ | ||
--with-mpfr=$PREFIX \ | ||
--prefix=$PREFIX | ||
make -j6 | ||
make install | ||
cd ../ | ||
|
||
# -- copy headers -- | ||
cp $PREFIX/include/{gmp,mpfr,mpc}.h gmpy2/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@echo on | ||
cd .local\bin | ||
set "PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\" | ||
call D:\a\gmpy\gmpy\scripts\dll2lib.bat 64 libgmp-10.dll | ||
call D:\a\gmpy\gmpy\scripts\dll2lib.bat 64 libmpfr-6.dll | ||
call D:\a\gmpy\gmpy\scripts\dll2lib.bat 64 libmpc-3.dll | ||
ren libgmp-10.lib gmp.lib | ||
ren libmpfr-6.lib mpfr.lib | ||
ren libmpc-3.lib mpc.lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
DEST_DIR=$1 | ||
WHEEL=$2 | ||
LD_LIBRARY_PATH="$(pwd)/.local/lib:$LD_LIBRARY_PATH" | ||
|
||
if [[ "$OSTYPE" == "darwin"* ]] | ||
then | ||
delocate-wheel --lib-sdir ../gmpy2.libs -w ${DEST_DIR} -v ${WHEEL} | ||
else | ||
auditwheel repair -w ${DEST_DIR} ${WHEEL} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set WHEELHOUSE=%1 | ||
set WHEELNAME=%2 | ||
|
||
msys2 -c scripts/cibw_repair_wheel_command_windows.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -e -x | ||
|
||
wheel=$WHEELNAME | ||
dest_dir=$WHEELHOUSE | ||
|
||
delvewheel repair ${wheel} -w ${dest_dir} --add-path .local/bin --no-mangle-all | ||
|
||
cp .local/bin/{gmp,mpfr,mpc}.lib ${dest_dir} | ||
(cd ${dest_dir}; wheel unpack --dest . gmpy2-*.whl; mv *.lib gmpy2-*/gmpy2.libs; wheel pack gmpy2-*[0-9]; rm -rf gmpy2-*[0-9]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
echo "dll2lib" | ||
@echo off | ||
|
||
REM From https://github.com/GBillotey/Fractalshades/blob/master/win_build/dll2lib.bat | ||
|
||
REM Usage: dll2lib [32|64] some-file.dll | ||
REM | ||
REM Generates some-file.lib from some-file.dll, making an intermediate | ||
REM some-file.def from the results of dumpbin /exports some-file.dll. | ||
REM | ||
REM Requires 'dumpbin' and 'lib' in PATH - run from VS developer prompt. | ||
REM | ||
REM Script inspired by http://stackoverflow.com/questions/9946322/how-to-generate-an-import-library-lib-file-from-a-dll | ||
REM See also https://gist.github.com/Trass3r/8d0232a66b098530d07b0e48df6ad5ef | ||
|
||
SETLOCAL | ||
if "%1"=="32" (set machine=x86) else (set machine=x64) | ||
cd %~p2 | ||
set dll_file=%~f2 | ||
set dll_file_no_ext=%~n2 | ||
set exports_file=%dll_file_no_ext%-exports.txt | ||
set def_file=%dll_file_no_ext%.def | ||
set lib_file=%dll_file_no_ext%.lib | ||
set lib_name=%dll_file_no_ext% | ||
|
||
dumpbin /exports %dll_file% > %exports_file% | ||
|
||
echo LIBRARY %lib_name% > %def_file% | ||
echo EXPORTS >> %def_file% | ||
for /f "skip=19 tokens=1,4" %%A in (%exports_file%) do if NOT "%%B" == "" (echo %%B @%%A >> %def_file%) | ||
|
||
lib /def:%def_file% /out:%lib_file% /machine:%machine% | ||
|
||
REM Clean up temporary intermediate files | ||
del %exports_file% %def_file% %dll_file_no_ext%.exp |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters