Skip to content

Commit

Permalink
fix: restructure package
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTenmann committed Dec 1, 2021
1 parent 62318e8 commit 1e87d25
Show file tree
Hide file tree
Showing 16 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: install dependencies
command: |
python -m pip install -r requirements.txt
python -m pip install -e .
python -m pip install .
- save_cache:
paths:
- ~/.cache/pip
Expand All @@ -24,7 +24,7 @@ jobs:
- run:
name: run unit tests
command: |
python -m pytest -v tests --cov=${CIRCLE_REPO_NAME/-/_}
python -m pytest -v tests --cov=${CIRCLE_REPONAME/-/_}
workflows:
version: 2
Expand Down
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import traceback
from glob import glob

from pybind11.setup_helpers import Pybind11Extension
from pybind11.setup_helpers import ParallelCompile, Pybind11Extension
from setuptools import setup, find_packages

logging.basicConfig(
Expand All @@ -35,12 +35,14 @@
logging.warning(f'Unable to get semantic release version. Setting version to {__version__}.')

PROJECT_NAME = 'setriq'
SOURCE_DIR = 'setriq'
SOURCE_DIR = 'src'

ParallelCompile("NPY_NUM_BUILD_JOBS").install()

extensions = [
Pybind11Extension(
f'{PROJECT_NAME}._C',
sources=sorted(glob(f'{SOURCE_DIR}/_C/**/*.cpp', recursive=True)),
sources=sorted(glob(f'{SOURCE_DIR}/{PROJECT_NAME}/_C/**/*.cpp', recursive=True)),
cxx_std=14,
define_macros=[('VERSION_INFO', __version__)],
include_dirs=['include/setriq'],
Expand All @@ -59,9 +61,9 @@
url='https://github.com/BenTenmann/setriq',
ext_modules=extensions,
license='MIT',
requires=[],
python_requires='>=3.7,<3.10',
packages=find_packages(exclude=['tests', 'scripts']),
package_data={f'{SOURCE_DIR}': sorted(glob(f'data/*.json'))},
package_dir={f'{PROJECT_NAME}': f'{SOURCE_DIR}/{PROJECT_NAME}'},
packages=find_packages(where=f'{SOURCE_DIR}', exclude=['tests', 'scripts']),
package_data={f'{PROJECT_NAME}': sorted(glob(f'data/*.json'))},
include_package_data=True
)
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.
2 changes: 1 addition & 1 deletion tests/test_setriq.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

import setriq
from src import setriq

ROUNDING = decimal.Decimal('0.0001')

Expand Down

0 comments on commit 1e87d25

Please sign in to comment.