-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize code into src folder to avoid import issues
- Loading branch information
1 parent
b6c46a1
commit b2f25fd
Showing
27 changed files
with
19 additions
and
29 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 |
---|---|---|
|
@@ -108,22 +108,7 @@ jobs: | |
CIBW_FREE_THREADED_SUPPORT: ${{ matrix.free_threaded_support }} | ||
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} | ||
CIBW_TEST_REQUIRES: pytest psutil | ||
CIBW_TEST_COMMAND: | | ||
mkdir tmp_test_dir | ||
cp -r {project}/stochastic_arrow/test tmp_test_dir/test | ||
cp -r {project}/data tmp_test_dir/data | ||
cd tmp_test_dir | ||
pytest | ||
CIBW_TEST_COMMAND_WINDOWS: | | ||
echo "Starting tests on Windows"; | ||
mkdir tmp_test_dir; | ||
echo "Copying test directory"; | ||
xcopy /E /I /Y stochastic_arrow\test tmp_test_dir\test; | ||
echo "Copying data directory"; | ||
xcopy /E /I /Y stochastic_arrow\data tmp_test_dir\data; | ||
cd tmp_test_dir; | ||
echo "Running pytest on Windows"; | ||
pytest -v | ||
CIBW_TEST_COMMAND: pytest -v {project}/test | ||
CIBW_ENVIRONMENT: USE_CYTHON=1 | ||
uses: pypa/[email protected] | ||
|
||
|
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include stochastic_arrow/obsidian.h | ||
include stochastic_arrow/mersenne.h | ||
include src/stochastic_arrow/obsidian.h | ||
include src/stochastic_arrow/mersenne.h |
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import os | ||
from setuptools import Extension, setup | ||
from setuptools import Extension, find_packages, setup | ||
import sys | ||
import numpy as np | ||
|
||
|
@@ -20,28 +20,31 @@ | |
|
||
ext = '.pyx' if USE_CYTHON else '.c' | ||
|
||
arrow_dir = os.path.join('src', 'stochastic_arrow') | ||
|
||
cython_extensions = [ | ||
Extension('stochastic_arrow.arrowhead', | ||
sources=[ | ||
'stochastic_arrow/mersenne.c', | ||
'stochastic_arrow/obsidian.c', | ||
'stochastic_arrow/arrowhead'+ext,], | ||
include_dirs=['stochastic_arrow', np.get_include()], | ||
os.path.join(arrow_dir, 'mersenne.c'), | ||
os.path.join(arrow_dir, 'obsidian.c'), | ||
os.path.join(arrow_dir, 'arrowhead'+ext),], | ||
include_dirs=[arrow_dir, np.get_include()], | ||
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')], | ||
)] | ||
|
||
if USE_CYTHON: | ||
from Cython.Build import cythonize | ||
cython_extensions = cythonize( | ||
cython_extensions, | ||
include_path=['stochastic_arrow'], | ||
include_path=[arrow_dir], | ||
annotate=True, # to get an HTML code listing | ||
) | ||
|
||
setup( | ||
name='stochastic-arrow', | ||
version='1.0.0', | ||
packages=['stochastic_arrow'], | ||
packages=find_packages('src'), | ||
package_dir={'': 'src'}, | ||
author='Ryan Spangler, John Mason, Jerry Morrison, Chris Skalnik, Travis Ahn-Horst, Sean Cheah', | ||
author_email='[email protected]', | ||
url='https://github.com/CovertLab/arrow', | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.