Skip to content

Commit f9c3dba

Browse files
committed
Initial version
0 parents  commit f9c3dba

13 files changed

+196
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.vscode/
2+
.venv/
3+
.pytest_cache/
4+
.nox/
5+
_skbuild/
6+
dist/
7+
8+
.DS_Store
9+
__pycache__
10+
.extrapythons

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "code"]
2+
path = code
3+
url = git@github.com:gershnik/spreader.git

Acknowledgments.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Acknowledgments
2+
3+
See the [Core Library Acknowledgments](code/Acknowledgments.md) for the list software used by the underlying C++ code.
4+
5+
This Python wrapper module does not add any dependencies on top of it.
6+

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## Unreleased
8+
### Added
9+
Initial version
10+

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2022, Eugene Gershnik
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice, this
7+
list of conditions and the following disclaimer.
8+
9+
2. Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation
11+
and/or other materials provided with the distribution.
12+
13+
3. Neither the name of the copyright holder nor the names of its
14+
contributors may be used to endorse or promote products derived from
15+
this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
include code/CMakeLists.txt
2+
recursive-include code/cmake *.cmake
3+
recursive-include code/lib/code *.h *.cpp *.l *.y *.txt
4+
recursive-include code/wrappers/python/src *.h *.cpp *.h *.txt *.py *.pyi
5+
include pyproject.toml
6+
include setup.py
7+
8+
global-exclude .gitignore
9+
global-exclude .gitmodules
10+
recursive-exclude _skbuild *
11+
exclude MANIFEST.in
12+

README.md

Whitespace-only changes.

code

Submodule code added at 209b2d7

commands.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
3+
Full local build
4+
```python
5+
pip3 install . -v
6+
```
7+
8+
Editable build for testing
9+
10+
1. Remove_skbuild
11+
2. ```python
12+
pip3 install -v --no-build-isolation --editable .
13+
```
14+
15+
Test
16+
17+
```python
18+
pytest '/Users/Shared/Work/spreader.py/code/wrappers/python'
19+
```
20+
21+
Make source distribution
22+
23+
```python
24+
rm -rf code/wrappers/python/src/spreader.egg-info
25+
mkdir -p dist/tmp
26+
python setup.py egg_info --egg-base dist/tmp sdist
27+
```
28+
29+
Make wheel
30+
31+
```python
32+
rm -rf code/wrappers/python/src/spreader.egg-info
33+
mkdir -p dist/tmp
34+
python setup.py egg_info --egg-base dist/tmp bdist_wheel
35+
```
36+
37+

noxfile.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import nox
2+
import re
3+
from pathlib import Path
4+
5+
mydir = Path(__file__).parent
6+
7+
extraPythons = []
8+
if (mydir/".extrapythons").exists():
9+
with open(mydir/".extrapythons", "r") as extraPythonsFile:
10+
for line in extraPythonsFile:
11+
line = line.strip()
12+
if len(line) != 0 and not re.match(r'\s*#.*', line):
13+
extraPythons.append(line.strip())
14+
15+
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"] + extraPythons)
16+
def test(session):
17+
session.install("-r", "requirements.txt")
18+
#session.env["CMAKE_ARGS"] = "-DCMAKE_BUILD_TYPE=Debug"
19+
#session.install("--no-build-isolation", "--editable", ".")
20+
session.install(".")
21+
session.run("pytest", "code/wrappers/python")
22+

0 commit comments

Comments
 (0)