Skip to content

Commit 1a1a959

Browse files
authored
Merge pull request #11 from ulf1/dev
Maintenance Q2-2021
2 parents 8e30650 + 1d961a3 commit 1a1a959

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
github: [ulf1]
12
patreon: ulfhamster
23
ko_fi: ulfhamster
3-
issuehunt: ulf1/sparsity-pattern

requirements-dev.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# syntax check, unit test, profiling
2-
flake8==3.7.*
3-
pytest==5.3.*
2+
flake8>=3.8.4
3+
pytest>=6.2.1
4+
twine==3.3.0
5+
pypandoc>=1.5
6+
wheel>=0.31.0

setup.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
from setuptools import setup
2-
import os
2+
import pypandoc
33

44

5-
def read(fname):
6-
return open(os.path.join(os.path.dirname(__file__), fname)).read()
5+
def get_version(path):
6+
with open(path, "r") as fp:
7+
lines = fp.read()
8+
for line in lines.split("\n"):
9+
if line.startswith('__version__'):
10+
delim = '"' if '"' in line else "'"
11+
return line.split(delim)[1]
12+
raise RuntimeError("Unable to find version string.")
713

814

915
setup(name='sparsity-pattern',
10-
version='0.4.0',
16+
version=get_version("sparsity_pattern/__init__.py"),
1117
description=(
1218
"Generate different types of sparsity pattern for sparse matrices."
1319
),
14-
# long_description=read('README.md'),
15-
# long_description_content_type='text/markdown',
20+
long_description=pypandoc.convert('README.md', 'rst'),
1621
url='http://github.com/ulf1/sparsity-pattern',
1722
author='Ulf Hamster',
1823
author_email='554c46@gmail.com',

sparsity_pattern/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
__version__ = '0.4.1'
2+
13
from .generators import (
24
get, diag, dense_quadratic, dense_pythonic, nodiag_quadratic,
35
nodiag_pythonic, blockflex, circledet)

0 commit comments

Comments
 (0)