Skip to content

Commit 82cf989

Browse files
committed
Get ready for release 7.0.0 (#6)
1 parent 8bb06b7 commit 82cf989

File tree

9 files changed

+87
-24
lines changed

9 files changed

+87
-24
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ repos:
99
stages: [commit]
1010
- id: end-of-file-fixer
1111
stages: [commit]
12-
- id: trailing-whitespace
12+
# - repo: https://github.com/pycqa/isort
13+
# rev: 5.10.1
14+
# hooks:
15+
# - id: isort
16+
# stages: [commit]
1317
- repo: https://github.com/psf/black
1418
rev: 22.3.0
1519
hooks:
1620
- id: black
1721
language_version: python3
18-
exclude: 'mathicsscript/version.py'
22+
exclude: 'pymathics/hello/version.py'
23+
stages: [commit]
1924
- repo: https://github.com/pycqa/flake8
2025
rev: 3.9.2
2126
hooks:

ChangeLog-spell-corrected.diff

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- ChangeLog 2024-08-19 13:00:26.144430865 -0400
2+
+++ ChangeLog-spell-corrected 2024-08-19 12:59:33.866689400 -0400
3+
@@ -10,7 +10,7 @@
4+
2024-08-19 Juan Mauricio Matera <[email protected]>
5+
6+
* pymathics/hello/__main__.py: adding blanklines between </dl> and
7+
- the examples in docstrings (#4) * addiing blanklines between </dl> and the examples in docstrings * Update __main__.py --------- Co-authored-by: R. Bernstein <[email protected]>
8+
+ the examples in docstrings (#4) * adding blanklines between </dl> and the examples in docstrings * Update __main__.py --------- Co-authored-by: R. Bernstein <[email protected]>
9+
10+
2024-08-19 rocky <[email protected]>
11+
12+
@@ -95,4 +95,3 @@
13+
2020-10-30 rocky <[email protected]>
14+
15+
* A simple PyMathics module A "Hello, World!" PyMathics Function and Symbol definition. Adapted from mmatera's PyMathics "testpymathicsmodule"
16+
-

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ rmChangeLog:
6363
#: Create a ChangeLog from git via git log and git2cl
6464
ChangeLog: rmChangeLog
6565
git log --pretty --numstat --summary | $(GIT2CL) >$@
66+
patch ChangeLog < ChangeLog-spell-corrected.diff

NEWS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
7.0.0
2+
-----
3+
4+
* Revise for 7.0.0 Mathics3 API; we need to explicilty load builtins
5+
6+
7+
1.0.0
8+
-----
9+
10+
* First release.

admin-tools/check-versions.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
function finish {
3+
cd $mathics_hello_owd
4+
}
5+
6+
# FIXME put some of the below in a common routine
7+
mathics_hello_owd=$(pwd)
8+
trap finish EXIT
9+
10+
cd $(dirname ${BASH_SOURCE[0]})
11+
if ! source ./pyenv-versions ; then
12+
exit $?
13+
fi
14+
15+
cd ..
16+
for version in $PYVERSIONS; do
17+
echo --- $version ---
18+
if ! pyenv local $version ; then
19+
exit $?
20+
fi
21+
make clean && pip install -e .
22+
if ! make check; then
23+
exit $?
24+
fi
25+
echo === $version ===
26+
done
27+
finish

admin-tools/make-dist.sh

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ PACKAGE=pymathics-hello
33

44
# FIXME put some of the below in a common routine
55
function finish {
6-
cd $owd
6+
cd $mathics_hello_owd
77
}
88

99
cd $(dirname ${BASH_SOURCE[0]})
10-
owd=$(pwd)
10+
mathics_hello_owd=$(pwd)
1111
trap finish EXIT
1212

1313
if ! source ./pyenv-versions ; then
@@ -19,21 +19,11 @@ cd ..
1919
source pymathics/hello/version.py
2020
echo $__version__
2121

22-
for pyversion in $PYVERSIONS; do
23-
if ! pyenv local $pyversion ; then
24-
exit $?
25-
fi
26-
# pip bdist_egg create too-general wheels. So
27-
# we narrow that by moving the generated wheel.
28-
29-
# Pick out first two number of version, e.g. 3.7.9 -> 37
30-
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
31-
rm -fr build
32-
python setup.py develop
33-
python setup.py bdist_egg
34-
python setup.py bdist_wheel
35-
python setup.py bdist_wheel --universal
36-
mv -v dist/${PACKAGE}-$VERSION-{py2.py3,py$first_two}-none-any.whl
37-
done
22+
if ! pyenv local $pyversion ; then
23+
exit $?
24+
fi
3825

26+
python setup.py bdist_wheel --universal
27+
mv -v dist/pymathics_hello-${__version__}-{py2.,}py3-none-any.whl
3928
python ./setup.py sdist
29+
finish

admin-tools/pyenv-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
55
echo "This script should be *sourced* rather than run directly through bash"
66
exit 1
77
fi
8-
export PYVERSIONS='3.6.13 3.7.10 3.8.10 3.9.5'
8+
export PYVERSIONS='3.8 3.9 3.10 3.11'

pymathics/hello/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# well as importing into Python. That's why there is no
66
# space around "=" below.
77
# fmt: off
8-
__version__="7.0.0dev1" # noqa
8+
__version__="7.0.0" # noqa

setup.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,36 @@
33

44
import sys
55
import platform
6+
import os.path as osp
67
from setuptools import setup, find_namespace_packages
78

89
# Ensure user has the correct Python version
9-
if sys.version_info < (3, 6):
10-
print("Mathics support Python 3.6 and above; you have %d.%d" % sys.version_info[:2])
10+
if sys.version_info < (3, 8):
11+
print("Mathics support Python 3.8 and above; you have %d.%d" % sys.version_info[:2])
1112
sys.exit(-1)
1213

14+
15+
def get_srcdir():
16+
filename = osp.normcase(osp.dirname(osp.abspath(__file__)))
17+
return osp.realpath(filename)
18+
19+
20+
def read(*rnames):
21+
return open(osp.join(get_srcdir(), *rnames)).read()
22+
23+
1324
# stores __version__ in the current namespace
1425
exec(compile(open("pymathics/hello/version.py").read(), "version.py", "exec"))
26+
long_description = read("README.rst") + "\n"
1527

1628
is_PyPy = platform.python_implementation() == "PyPy"
1729

1830
setup(
1931
name="pymathics-hello",
2032
maintainer="Mathics Group",
2133
maintainer_email="[email protected]",
34+
long_description=long_description,
35+
long_description_content_type="text/x-rst",
2236
version=__version__, # noqa
2337
packages=find_namespace_packages(include=["pymathics.*"]),
2438
install_requires=["Mathics3>=7.0.0.dev0"],

0 commit comments

Comments
 (0)