-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add setupy.py for C++ extensions installation, but not for configuration
- Loading branch information
1 parent
30990d2
commit 3afac4d
Showing
3 changed files
with
55 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ result_images/ | |
.coverage | ||
|
||
dist/ | ||
|
||
galpynostatic/lib/*.so |
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,29 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
# This file is part of galpynostatic | ||
# https://github.com/fernandezfran/galpynostatic/ | ||
# Copyright (c) 2022-2023, Francisco Fernandez | ||
# Copyright (c) 2024, Francisco Fernandez, Maximilano Gavilán, Andres Ruderman | ||
# License: MIT | ||
# https://github.com/fernandezfran/galpynostatic/blob/master/LICENSE | ||
|
||
from setuptools import setup, Extension | ||
|
||
_flags = ["-fPIC", "-O3", "-ftree-vectorize", "-march=native"] | ||
|
||
setup_args = dict( | ||
ext_modules=[ | ||
Extension( | ||
name="galpynostatic.lib.profile", | ||
sources=["galpynostatic/lib/profile.cpp"], | ||
extra_compile_args=_flags, | ||
), | ||
Extension( | ||
name="galpynostatic.lib.map", | ||
sources=["galpynostatic/lib/map.cpp"], | ||
extra_compile_args=_flags + ["-fopenmp"], | ||
), | ||
] | ||
) | ||
setup(**setup_args) |
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 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
# This file is part of galpynostatic | ||
# https://github.com/fernandezfran/galpynostatic/ | ||
# Copyright (c) 2022-2023, Francisco Fernandez | ||
# Copyright (c) 2024, Francisco Fernandez, Maximilano Gavilán, Andres Ruderman | ||
# License: MIT | ||
# https://github.com/fernandezfran/galpynostatic/blob/master/LICENSE | ||
|
||
# ============================================================================= | ||
# IMPORTS | ||
# ============================================================================= | ||
|
||
import galpynostatic.lib | ||
|
||
# ============================================================================= | ||
# TESTS | ||
# ============================================================================= | ||
|
||
|
||
def test_docs(): | ||
"""Test the docs.""" | ||
assert isinstance(galpynostatic.lib.__doc__, str) |