Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop' into t/9424/9424
Browse files Browse the repository at this point in the history
* develop: (374 commits)
  Updated Sage version to 6.8.beta3
  Add HughesPlane to the catalog
  Added Element attribute to FreeAbelianMonoid_class
  Changed the return value of gen() in FreeAbelianMonoid_class
  Small formating fixes (adding outputs, fixing doc indent)
  Trac 18086: fixed a small Dirichlet character bug
  Trac 18086: reviewer comments
  Trac 18086: implement twisting of newforms by Dirichlet characters
  Trac #18527: (review) cleaning
  Trac #18257: (review) remove trailing whitespaces
  Add authors, cleaned description
  Trac #18527: (review) small cleanup
  Trac #18527: (review) fix the case of non prime q
  Trac #18257: (review) better q3_minus_one_matrix
  Trac #18527: (review) rename random_q3_xxx -> q3_xxx
  Trac #18527: (review) remove trailing whitespaces
  Corrected HughesPlane description
  Changed HughesPlane description according to the review
  Add type file
  Trac #18527 (review): improve the documentation
  ...
  • Loading branch information
rwst committed Jun 11, 2015
2 parents b213d69 + 336ae6c commit 985fdb4
Show file tree
Hide file tree
Showing 730 changed files with 18,056 additions and 35,193 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
@@ -1 +1 @@
Sage version 6.8.beta0, released 2015-05-23
Sage version 6.8.beta3, released 2015-06-04
20 changes: 4 additions & 16 deletions build/deps
Expand Up @@ -27,7 +27,6 @@ all-sage: \
$(STANDARD_PACKAGES) \
$(INST)/$(SAGE_MP_LIBRARY) \
$(INST)/sage \
$(INST)/csage \
$(EXTCODE) \
$(SCRIPTS)

Expand All @@ -50,7 +49,7 @@ toolchain-deps:

# Everything needed to start up Sage using "./sage". Of course, not
# every part of Sage will work. It does not include Maxima for example.
SAGERUNTIME = $(SCRIPTS) $(INST)/sage $(INST)/$(SAGENB) $(INST)/$(IPYTHON)
SAGERUNTIME = $(SCRIPTS) $(INST)/sage $(INST)/$(IPYTHON)

###############################################################################
# Building the base system
Expand Down Expand Up @@ -109,34 +108,23 @@ $(INST)/sage: \
$(INST)/$(NTL) \
$(INST)/$(NUMPY) \
$(INST)/$(PARI) \
$(INST)/$(PLANARITY) \
$(INST)/$(POLYBORI) \
$(INST)/$(PPL) \
$(INST)/$(PYNAC) \
$(INST)/$(PYTHON) \
$(INST)/$(RATPOINTS) \
$(INST)/$(READLINE) \
$(INST)/$(SINGULAR) \
$(INST)/$(SIX) \
$(INST)/$(SYMMETRICA) \
$(INST)/$(ZN_POLY) \
$(INST)/csage
$(INST)/$(ZN_POLY)
if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && \
$(PIPE) 'time $(MAKE) sage 2>&1' 'tee -a $(SAGE_LOGS)/sage-$(SAGE_VERSION).log' && \
touch $@; \
fi

$(INST)/csage: $(INST)/$(SCONS) \
$(INST)/$(SAGE_MP_LIBRARY) \
$(INST)/$(NTL) \
$(INST)/$(PARI) \
$(INST)/$(PYTHON) \
$(CSAGE_SOURCES)
if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && \
$(PIPE) 'time $(MAKE) csage 2>&1' 'tee -a $(SAGE_LOGS)/csage-$(SAGE_VERSION).log' && \
touch $@; \
fi

# TODO: remove this once ccache is a new-style package
CCACHE = ccache
$(INST)/ccache: base $(INST)/$(ZLIB)
Expand Down
26 changes: 18 additions & 8 deletions build/install
Expand Up @@ -311,9 +311,12 @@ filtered_packages_list() {
for DIR in $SAGE_ROOT/build/pkgs/*; do

PKG_TYPE_FILE="$DIR/type"
PKG_TYPE=`cat $PKG_TYPE_FILE`
if [ $? -ne 0 ]; then
continue
if [ -f "$PKG_TYPE_FILE" ]; then
PKG_TYPE=`cat $PKG_TYPE_FILE`
else
echo >&2 "\"$PKG_TYPE_FILE\" is missing. Create it, and set its content"
echo >&2 "to 'base', 'standard', 'optional' or 'experimental'."
return 1
fi

# Check consistency of 'DIR/type' file
Expand All @@ -332,6 +335,9 @@ filtered_packages_list() {
done
}

# Check that all packages define a (valid) 'type' file, or exit
filtered_packages_list none || exit $?

echo >&5 "# All Sage packages"

filtered_packages_list all | while read PKG_NAME PKG_VERSION PKG_VAR; do
Expand All @@ -344,8 +350,17 @@ cat >&5 <<EOF
# Directory to keep track of which packages are installed
INST=`echo "$SAGE_SPKG_INST" | sed 's/ /\\\\ /g'`
# Aliases for optional packages selected at build time
EOF


# Python version
if [ "$SAGE_PYTHON3" = yes ]; then
echo >&5 'PYTHON = $(PYTHON3)'
else
echo >&5 'PYTHON = $(PYTHON2)'
fi

# Sage MP library
echo >&5 "SAGE_MP_LIBRARY = \$($SAGE_MP_LIBRARY)"

Expand All @@ -372,11 +387,6 @@ echo >&5
echo >&5


echo >&5 'CSAGE_SOURCES = \'
for file in "$SAGE_SRC/c_lib/src/"*.cpp "$SAGE_SRC/c_lib/include"/*.h; do
echo >&5 " \$(SAGE_SRC)${file#$SAGE_SRC} \\"
done
echo >&5
echo >&5 'SCRIPT_SOURCES = \'
for file in "$SAGE_SRC/bin/"*; do
echo >&5 " \$(SAGE_SRC)${file#$SAGE_SRC} \\"
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/4ti2/type
@@ -1 +1 @@
optional
experimental
2 changes: 1 addition & 1 deletion build/pkgs/atlas/enums.py
Expand Up @@ -198,5 +198,5 @@ def make_check_enums():
from subprocess import check_output
output = check_output('make xprint_enums ; ./xprint_enums', shell=True)
print(output)
check_enums(output)
check_enums(output.decode('ascii'))

2 changes: 1 addition & 1 deletion build/pkgs/autotools/type
@@ -1 +1 @@
optional
experimental
2 changes: 1 addition & 1 deletion build/pkgs/compilerwrapper/type
@@ -1 +1 @@
optional
experimental
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=8a7caccab5eeda4632ef48746ca0765731a25694
md5=b3831378287897b2b91cbc54b97f4fe4
cksum=3325770959
sha1=ba70d13aace4a7894ceec5d6e56f29b39756ab30
md5=b2e6ae57f6f348b3f5bf9baaa2b7049f
cksum=2993700783
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
@@ -1 +1 @@
94
97
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
@@ -1 +1 @@
0.22.p3
0.22.p4
72 changes: 72 additions & 0 deletions build/pkgs/cython/patches/show_progress.patch
@@ -0,0 +1,72 @@
commit ce5250b8d893e17b18add232ba1e9263c73b5909
Author: Jeroen Demeyer <jdemeyer@cage.ugent.be>
Date: Sat Apr 25 22:24:40 2015 +0200

Progress indicator for cythonize()

diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
index 4514493..853c591 100644
--- a/Cython/Build/Dependencies.py
+++ b/Cython/Build/Dependencies.py
@@ -832,7 +832,15 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
if not os.path.exists(options.cache):
os.makedirs(options.cache)
to_compile.sort()
- if len(to_compile) <= 1:
+ # Drop "priority" component of "to_compile" entries and add a
+ # simple-minded progress indicator.
+ N = len(to_compile)
+ progress_fmt = "[{:%i}/{}] " % len(str(N))
+ for i in range(N):
+ progress = progress_fmt.format(i+1, N)
+ to_compile[i] = to_compile[i][1:] + (progress,)
+
+ if N <= 1:
nthreads = 0
if nthreads:
# Requires multiprocessing (or Python >= 2.6)
@@ -862,7 +870,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
pool.join()
if not nthreads:
for args in to_compile:
- cythonize_one(*args[1:])
+ cythonize_one(*args)

if exclude_failures:
failed_modules = set()
@@ -927,7 +935,7 @@ else:

# TODO: Share context? Issue: pyx processing leaks into pxd module
@record_results
-def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_failure=True, embedded_metadata=None):
+def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_failure=True, embedded_metadata=None, progress=""):
from ..Compiler.Main import compile, default_options
from ..Compiler.Errors import CompileError, PyrexError

@@ -944,7 +952,7 @@ def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_f
options.cache, "%s-%s%s" % (os.path.basename(c_file), fingerprint, gzip_ext))
if os.path.exists(fingerprint_file):
if not quiet:
- print("Found compiled %s in cache" % pyx_file)
+ print("%sFound compiled %s in cache" % (progress, pyx_file))
os.utime(fingerprint_file, None)
g = gzip_open(fingerprint_file, 'rb')
try:
@@ -957,7 +965,7 @@ def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_f
g.close()
return
if not quiet:
- print("Cythonizing %s" % pyx_file)
+ print("%sCythonizing %s" % (progress, pyx_file))
if options is None:
options = CompilationOptions(default_options)
options.output_file = c_file
@@ -1000,7 +1008,7 @@ def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_f
def cythonize_one_helper(m):
import traceback
try:
- return cythonize_one(*m[1:])
+ return cythonize_one(*m)
except Exception:
traceback.print_exc()
raise
78 changes: 78 additions & 0 deletions build/pkgs/cython/patches/transitive_dependencies.patch
@@ -0,0 +1,78 @@
commit 2285a087a3976ef301a8ea740fb5568f91930c8e
Author: Jeroen Demeyer <jdemeyer@cage.ugent.be>
Date: Tue Apr 21 14:40:12 2015 +0200

When merging a transitive_list, copy the list

diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
index 3fe6885..ae47c62 100644
--- a/Cython/Build/Dependencies.py
+++ b/Cython/Build/Dependencies.py
@@ -216,12 +216,13 @@ class DistutilsInfo(object):
self.values[key] = value
elif type is transitive_list:
if key in self.values:
- all = self.values[key]
+ # Change a *copy* of the list (Trac #845)
+ all = self.values[key][:]
for v in value:
if v not in all:
all.append(v)
- else:
- self.values[key] = value
+ value = all
+ self.values[key] = value
return self

def subs(self, aliases):
@@ -250,9 +251,8 @@ class DistutilsInfo(object):
for key, value in self.values.items():
type = distutils_settings[key]
if type in [list, transitive_list]:
- getattr(extension, key).extend(value)
- else:
- setattr(extension, key, value)
+ value = getattr(extension, key) + list(value)
+ setattr(extension, key, value)

@cython.locals(start=long, q=long, single_q=long, double_q=long, hash_mark=long,
end=long, k=long, counter=long, quote_len=long)
diff --git a/tests/compile/distutils_libraries_T845.srctree b/tests/compile/distutils_libraries_T845.srctree
new file mode 100644
index 0000000..69c8549
--- /dev/null
+++ b/tests/compile/distutils_libraries_T845.srctree
@@ -0,0 +1,33 @@
+PYTHON setup.py build_ext --inplace
+
+######## setup.py ########
+
+from Cython.Build import cythonize
+from Cython.Distutils.extension import Extension
+
+ext_modules = [
+ Extension("a", ["a.pyx"]),
+ Extension("x", ["x.pyx"]),
+ Extension("y", ["y.pyx"]),
+]
+
+ext_modules = cythonize(ext_modules)
+
+assert ext_modules[1].libraries == ["lib_x"]
+assert ext_modules[2].libraries == ["lib_y"]
+
+######## libx.pxd ########
+# distutils: libraries = lib_x
+
+######## liby.pxd ########
+# distutils: libraries = lib_y
+
+######## a.pyx ########
+cimport libx
+cimport liby
+
+######## x.pyx ########
+cimport libx
+
+######## y.pyx ########
+cimport liby
2 changes: 1 addition & 1 deletion build/pkgs/fricas/type
@@ -1 +1 @@
optional
experimental
2 changes: 1 addition & 1 deletion build/pkgs/gap_packages/type
@@ -1 +1 @@
optional
experimental
6 changes: 3 additions & 3 deletions build/pkgs/git_trac/checksums.ini
@@ -1,4 +1,4 @@
tarball=git_trac-VERSION.tar.bz2
sha1=624d927bc0d6cb315f7158df97293adac46e14b0
md5=87d6eeb330abbba494e5bb898f73c0fd
cksum=1266226813
sha1=90c1e2c279fcac22b050c62253cfb53c8fe9c9c1
md5=1f6e913132aa16b19cb5c99ee921f3f5
cksum=774035580
2 changes: 1 addition & 1 deletion build/pkgs/git_trac/package-version.txt
@@ -1 +1 @@
1.0
20150522
2 changes: 1 addition & 1 deletion build/pkgs/jmol/dependencies
@@ -1,4 +1,4 @@
| $(INST)/$(SAGENB)


----------
All lines of this file are ignored except the first.
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/latte_int/checksums.ini
@@ -1,4 +1,4 @@
tarball=latte_int-VERSION.tar.gz
sha1=165c9173b13f4bc9cb825ef63c06d6fb20dc41b5
md5=57b151f7bb49fe5154a5697b70d359f9
cksum=1072837189
sha1=3bdf739efe12f5e910668afa17341db21204d38c
md5=2ec40606c6755ba1770c8ac31155ecd9
cksum=1498070052
2 changes: 1 addition & 1 deletion build/pkgs/latte_int/package-version.txt
@@ -1 +1 @@
1.7.2
1.7.3
3 changes: 2 additions & 1 deletion build/pkgs/latte_int/spkg-check
Expand Up @@ -16,7 +16,8 @@ fi

export CFLAGS

dirsr="$CUR"/src
LATTE_VERSION="$(cat ${SAGE_ROOT}/build/pkgs/latte_int/package-version.txt)"
dirsr="$CUR"/latte-int-${LATTE_VERSION}
echo "Testing in $dirsr"
cd "$dirsr"
$MAKE check
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/latte_int/type
@@ -1 +1 @@
optional
experimental
32 changes: 32 additions & 0 deletions build/pkgs/planarity/SPKG.txt
@@ -0,0 +1,32 @@
= planarity =

== Description ==

This code project provides a library for implementing graph algorithms as well
as implementations of several planarity-related graph algorithms. The origin of
this project is the reference implementation for the Edge Addition Planarity
Algorithm [1], which is now the fastest and simplest linear-time method for
planar graph embedding and planarity obstruction isolation (i.e. Kuratowski
subgraph isolation).

[1] http://dx.doi.org/10.7155/jgaa.00091

== License ==

New BSD License

== SPKG Maintainers ==

Nathann Cohen (nathann.cohen@gmail.com)

== Upstream Contact ==

John Boyer <John.Boyer.PhD@gmail.com>

== Dependencies ==

None

== Patches ==

None
4 changes: 4 additions & 0 deletions build/pkgs/planarity/checksums.ini
@@ -0,0 +1,4 @@
tarball=planarity-VERSION.tar.bz2
sha1=3ef0985a2b8476123969cef5c1273d11286605f2
md5=3e05f05ad8bf777e6a7ad48958a18c06
cksum=679137721
1 change: 1 addition & 0 deletions build/pkgs/planarity/package-version.txt
@@ -0,0 +1 @@
2.2.0

0 comments on commit 985fdb4

Please sign in to comment.