-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from oscarbenjamin/pr_meson_python
Use meson-python instead of setuptools for wheels
- Loading branch information
Showing
16 changed files
with
260 additions
and
42 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 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 |
---|---|---|
|
@@ -18,3 +18,4 @@ MANIFEST | |
.python-version | ||
*.DS_Store | ||
.venv | ||
.hypothesis |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export C_INCLUDE_PATH=$(pwd)/.local/include | ||
export LIBRARY_PATH=$(pwd)/.local/lib | ||
export LD_LIBRARY_PATH=$(pwd)/.local/lib | ||
export PYTHONPATH=$(pwd)/src |
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,19 @@ | ||
project('python-flint', 'cython', 'c') | ||
|
||
py = import('python').find_installation(pure: false) | ||
dep_py = py.dependency() | ||
|
||
cc = meson.get_compiler('c') | ||
|
||
gmp_dep = dependency('gmp') | ||
mpfr_dep = dependency('mpfr') | ||
flint_dep = dependency('flint') | ||
|
||
# flint.pc was missing -lflint until Flint 3.1.0 | ||
if flint_dep.version().version_compare('<3.1') | ||
flint_dep = cc.find_library('flint') | ||
endif | ||
|
||
pyflint_deps = [dep_py, gmp_dep, mpfr_dep, flint_dep] | ||
|
||
subdir('src/flint') |
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,26 @@ | ||
pkgdir = 'flint/flint_base' | ||
|
||
pyfiles = [ | ||
'__init__.py', | ||
] | ||
|
||
exts = [ | ||
'flint_base', | ||
'flint_context', | ||
] | ||
|
||
py.install_sources( | ||
pyfiles, | ||
pure: false, | ||
subdir: pkgdir, | ||
) | ||
|
||
foreach ext : exts | ||
py.extension_module( | ||
ext, | ||
ext + '.pyx', | ||
dependencies: pyflint_deps, | ||
install: true, | ||
subdir: pkgdir, | ||
) | ||
endforeach |
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,23 @@ | ||
pyfiles = [ | ||
'__init__.py', | ||
] | ||
|
||
exts = [ | ||
'showgood', | ||
] | ||
|
||
py.install_sources( | ||
pyfiles, | ||
pure: false, | ||
subdir: 'flint/functions', | ||
) | ||
|
||
foreach ext : exts | ||
py.extension_module( | ||
ext, | ||
ext + '.pyx', | ||
dependencies: pyflint_deps, | ||
install: true, | ||
subdir: 'flint/functions', | ||
) | ||
endforeach |
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,37 @@ | ||
thisdir = 'flint' | ||
|
||
pyfiles = [ | ||
'__init__.py', | ||
] | ||
|
||
exts = [ | ||
'pyflint', | ||
] | ||
|
||
pkgs = [ | ||
'flint_base', | ||
'types', | ||
'functions', | ||
'utils', | ||
'test', | ||
] | ||
|
||
py.install_sources( | ||
pyfiles, | ||
pure: false, | ||
subdir: thisdir, | ||
) | ||
|
||
foreach ext : exts | ||
py.extension_module( | ||
ext, | ||
ext + '.pyx', | ||
dependencies: pyflint_deps, | ||
install: true, | ||
subdir: thisdir, | ||
) | ||
endforeach | ||
|
||
foreach pkg : pkgs | ||
subdir(pkg) | ||
endforeach |
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,13 @@ | ||
thisdir = 'flint/test' | ||
|
||
pyfiles = [ | ||
'__init__.py', | ||
'__main__.py', | ||
'test_all.py', | ||
] | ||
|
||
py.install_sources( | ||
pyfiles, | ||
pure: false, | ||
subdir: thisdir, | ||
) |
File renamed without changes.
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,58 @@ | ||
thisdir = 'flint/types' | ||
|
||
pyfiles = [ | ||
'__init__.py', | ||
] | ||
|
||
exts = [ | ||
'fmpz', | ||
'fmpz_poly', | ||
'fmpz_mat', | ||
'fmpz_series', | ||
|
||
'fmpq', | ||
'fmpq_poly', | ||
'fmpq_mat', | ||
'fmpq_series', | ||
|
||
'nmod', | ||
'nmod_poly', | ||
'nmod_mat', | ||
'nmod_series', | ||
|
||
'fmpz_mod', | ||
'fmpz_mod_poly', | ||
'fmpz_mod_mat', | ||
|
||
'arf', | ||
|
||
'arb', | ||
'arb_poly', | ||
'arb_mat', | ||
'arb_series', | ||
|
||
'acb', | ||
'acb_poly', | ||
'acb_mat', | ||
'acb_series', | ||
|
||
'dirichlet', | ||
|
||
'fmpz_mpoly', | ||
] | ||
|
||
py.install_sources( | ||
pyfiles, | ||
pure: false, | ||
subdir: thisdir, | ||
) | ||
|
||
foreach ext : exts | ||
py.extension_module( | ||
ext, | ||
ext + '.pyx', | ||
dependencies: pyflint_deps, | ||
install: true, | ||
subdir: thisdir, | ||
) | ||
endforeach |
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,24 @@ | ||
thisdir = 'flint/utils' | ||
|
||
pyfiles = [ | ||
'__init__.py', | ||
'flint_exceptions.py', | ||
] | ||
|
||
exts = [] | ||
|
||
py.install_sources( | ||
pyfiles, | ||
pure: false, | ||
subdir: thisdir, | ||
) | ||
|
||
foreach ext : exts | ||
py.extension_module( | ||
ext, | ||
ext + '.pyx', | ||
dependencies: pyflint_deps, | ||
install: true, | ||
subdir: thisdir, | ||
) | ||
endforeach |