-
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
133 additions
and
41 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
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,11 +1,10 @@ | ||
include README.rst | ||
include CHANGES.rst | ||
include ChangeLog | ||
include COPYING | ||
include COPYING.txt | ||
include FUTURE.rst | ||
include Makefile | ||
include test/Makefile | ||
recursive-include mathics | ||
recursive-include xdis *.py | ||
recursive-exclude __pycache__ | ||
include mathics/Makefile | ||
include mathics/Makefile | ||
recursive-include mathics *.py | ||
recursive-include test *.py |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
PACKAGE=mathics | ||
|
||
# FIXME put some of the below in a common routine | ||
function finish { | ||
cd $owd | ||
} | ||
|
||
cd $(dirname ${BASH_SOURCE[0]}) | ||
owd=$(pwd) | ||
trap finish EXIT | ||
|
||
if ! source ./pyenv-versions ; then | ||
exit $? | ||
fi | ||
|
||
|
||
cd .. | ||
source $PACKAGE/version.py | ||
echo $__version__ | ||
|
||
for pyversion in $PYVERSIONS; do | ||
if ! pyenv local $pyversion ; then | ||
exit $? | ||
fi | ||
# pip bdist_egg create too-general wheels. So | ||
# we narrow that by moving the generated wheel. | ||
|
||
# Pick out first two number of version, e.g. 3.7.9 -> 37 | ||
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//') | ||
rm -fr build | ||
python setup.py bdist_egg | ||
python setup.py bdist_wheel | ||
python setup.py bdist_wheel --universal | ||
mv -v dist/${PACKAGE}-$VERSION-{py2.py3,py$first_two}-none-any.whl | ||
done | ||
|
||
python ./setup.py sdist |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- shell-script -*- | ||
# Sets PYVERSIONS to be pyenv versions that | ||
# we can use in the master branch. | ||
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then | ||
echo "This script should be *sourced* rather than run directly through bash" | ||
exit 1 | ||
fi | ||
export PYVERSIONS='3.6.12 3.7.9 3.8.6 3.9.0' |
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
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 |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
""" | ||
|
||
import sys | ||
import os.path as osp | ||
import platform | ||
from setuptools import setup, Command, Extension | ||
|
||
|
@@ -34,9 +35,22 @@ | |
print("Mathics does not support Python %d.%d" % sys.version_info[:2]) | ||
sys.exit(-1) | ||
|
||
def get_srcdir(): | ||
filename = osp.normcase(osp.dirname(osp.abspath(__file__))) | ||
return osp.realpath(filename) | ||
|
||
|
||
def read(*rnames): | ||
return open(osp.join(get_srcdir(), *rnames)).read() | ||
|
||
|
||
# stores __version__ in the current namespace | ||
exec(compile(open("mathics/version.py").read(), "mathics/version.py", "exec")) | ||
|
||
# Get/set VERSION and long_description from files | ||
long_description = read("README.rst") + "\n" | ||
|
||
|
||
is_PyPy = platform.python_implementation() == "PyPy" | ||
|
||
INSTALL_REQUIRES = [] | ||
|
@@ -70,13 +84,14 @@ | |
"django >= 3.0, < 3.2", | ||
"mpmath>=1.1.0", | ||
"numpy", | ||
"palettable", # For bar charts, and portable, no-proprietary color palletes | ||
"palettable", # For bar charts, and portable, no-proprietary color palletes | ||
"pint", | ||
"python-dateutil", | ||
"llvmlite", | ||
"requests", | ||
] | ||
|
||
|
||
def subdirs(root, file="*.*", depth=10): | ||
for k in range(depth): | ||
yield root + "*/" * k + file | ||
|
@@ -112,7 +127,7 @@ def run(self): | |
|
||
database_file = settings["DATABASES"]["default"]["NAME"] | ||
print("Creating data directory %s" % settings["DATA_DIR"]) | ||
if not os.path.exists(settings["DATA_DIR"]): | ||
if not osp.exists(settings["DATA_DIR"]): | ||
os.makedirs(settings["DATA_DIR"]) | ||
print("Creating database %s" % database_file) | ||
try: | ||
|
@@ -180,14 +195,16 @@ def run(self): | |
"mathics.web", | ||
"mathics.web.templatetags", | ||
"mathics.web.migrations", | ||
"pymathics.testpymathicsmodule" | ||
"pymathics.testpymathicsmodule", | ||
], | ||
install_requires=INSTALL_REQUIRES, | ||
dependency_links=DEPENDENCY_LINKS, | ||
package_data={ | ||
"mathics": [ | ||
"data/*.csv", | ||
"data/ExampleData/*", | ||
"doc/xml/data", | ||
"doc/tex/data", | ||
"autoload/formats/*/Import.m", | ||
"autoload/formats/*/Export.m", | ||
"packages/*/*.m", | ||
|
@@ -219,11 +236,12 @@ def run(self): | |
"mathicsscript = mathics.script:main", | ||
], | ||
}, | ||
long_description=long_description, | ||
long_description_content_type="text/x-rst", | ||
# don't pack Mathics in egg because of media files, etc. | ||
zip_safe=False, | ||
# metadata for upload to PyPI | ||
author="Angus Griffith", | ||
author_email="[email protected]", | ||
maintainer="Mathics Group", | ||
description="A general-purpose computer algebra system.", | ||
license="GPL", | ||
url="https://mathics.org/", | ||
|
@@ -234,7 +252,6 @@ def run(self): | |
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Programming Language :: Python", | ||
|
||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
|