mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
etc: add missing license boilerplates
This commit is contained in:
parent
fc1d655ed2
commit
0ebe112b3b
@ -1,5 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
# Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
# xfail-license
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
# xfail-license
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
# this combines all the working run-pass tests into a single large crate so we
|
# This combines all the working run-pass tests into a single large crate so we
|
||||||
# can run it "fast": spawning zillions of windows processes is our major build
|
# can run it "fast": spawning zillions of windows processes is our major build
|
||||||
# bottleneck (and it doesn't hurt to run faster on other platforms as well).
|
# bottleneck (and it doesn't hurt to run faster on other platforms as well).
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
# xfail-license
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
# Copies Rust runtime dependencies to the specified directory
|
# Copies Rust runtime dependencies to the specified directory.
|
||||||
|
|
||||||
import snapshot, sys, os, shutil
|
import snapshot, sys, os, shutil
|
||||||
|
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
# xfail-license
|
# Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
# -*- coding: utf-8 -*-
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Script for extracting compilable fragments from markdown documentation. See
|
Script for extracting compilable fragments from markdown documentation. See
|
||||||
prep.js for a description of the format recognized by this tool. Expects
|
prep.js for a description of the format recognized by this tool. Expects
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
# Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
# xfail-license
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
# This script is for extracting the grammar from the rust docs.
|
# This script is for extracting the grammar from the rust docs.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# xfail-license
|
#
|
||||||
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
# file at the top-level directory of this distribution and at
|
# file at the top-level directory of this distribution and at
|
||||||
# http://rust-lang.org/COPYRIGHT.
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# xfail-license
|
#
|
||||||
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
# file at the top-level directory of this distribution and at
|
# file at the top-level directory of this distribution and at
|
||||||
# http://rust-lang.org/COPYRIGHT.
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
# xfail-license
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import os, tarfile, re, shutil, sys
|
import os, tarfile, re, shutil, sys
|
||||||
from snapshot import *
|
from snapshot import *
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# xfail-license
|
#
|
||||||
|
# Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import os, tarfile, hashlib, re, shutil, sys
|
import os, tarfile, hashlib, re, shutil, sys
|
||||||
from snapshot import *
|
from snapshot import *
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
# xfail-license
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import snapshot, sys
|
import snapshot, sys
|
||||||
|
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
# xfail-license
|
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# xfail-license
|
#
|
||||||
|
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import os, tarfile, hashlib, re, shutil
|
import os, tarfile, hashlib, re, shutil
|
||||||
from snapshot import *
|
from snapshot import *
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
# xfail-license
|
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,23 +1,31 @@
|
|||||||
# xfail-license
|
# Copyright 2011-2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import re, os, sys, glob, tarfile, shutil, subprocess, tempfile, distutils.spawn
|
import re, os, sys, glob, tarfile, shutil, subprocess, tempfile, distutils.spawn
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import hashlib
|
import hashlib
|
||||||
sha_func = hashlib.sha1
|
sha_func = hashlib.sha1
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import sha
|
import sha
|
||||||
sha_func = sha.new
|
sha_func = sha.new
|
||||||
|
|
||||||
def scrub(b):
|
def scrub(b):
|
||||||
if sys.version_info >= (3,) and type(b) == bytes:
|
if sys.version_info >= (3,) and type(b) == bytes:
|
||||||
return b.decode('ascii')
|
return b.decode('ascii')
|
||||||
else:
|
else:
|
||||||
return b
|
return b
|
||||||
|
|
||||||
src_dir = scrub(os.getenv("CFG_SRC_DIR"))
|
src_dir = scrub(os.getenv("CFG_SRC_DIR"))
|
||||||
if not src_dir:
|
if not src_dir:
|
||||||
raise Exception("missing env var CFG_SRC_DIR")
|
raise Exception("missing env var CFG_SRC_DIR")
|
||||||
|
|
||||||
snapshotfile = os.path.join(src_dir, "src", "snapshots.txt")
|
snapshotfile = os.path.join(src_dir, "src", "snapshots.txt")
|
||||||
download_url_base = "http://static.rust-lang.org/stage0-snapshots"
|
download_url_base = "http://static.rust-lang.org/stage0-snapshots"
|
||||||
@ -31,37 +39,36 @@ snapshot_files = {
|
|||||||
"freebsd": ["bin/rustc"],
|
"freebsd": ["bin/rustc"],
|
||||||
}
|
}
|
||||||
|
|
||||||
winnt_runtime_deps = ["libgcc_s_dw2-1.dll",
|
winnt_runtime_deps = ["libgcc_s_dw2-1.dll", "libstdc++-6.dll"]
|
||||||
"libstdc++-6.dll"]
|
|
||||||
|
|
||||||
def parse_line(n, line):
|
def parse_line(n, line):
|
||||||
global snapshotfile
|
global snapshotfile
|
||||||
|
|
||||||
if re.match(r"\s*$", line): return None
|
if re.match(r"\s*$", line): return None
|
||||||
|
|
||||||
if re.match(r"^T\s*$", line): return None
|
if re.match(r"^T\s*$", line): return None
|
||||||
|
|
||||||
match = re.match(r"\s+([\w_-]+) ([a-fA-F\d]{40})\s*$", line)
|
match = re.match(r"\s+([\w_-]+) ([a-fA-F\d]{40})\s*$", line)
|
||||||
if match:
|
if match:
|
||||||
return { "type": "file",
|
return { "type": "file",
|
||||||
"platform": match.group(1),
|
"platform": match.group(1),
|
||||||
"hash": match.group(2).lower() }
|
"hash": match.group(2).lower() }
|
||||||
|
|
||||||
match = re.match(r"([ST]) (\d{4}-\d{2}-\d{2}) ([a-fA-F\d]+)\s*$", line);
|
match = re.match(r"([ST]) (\d{4}-\d{2}-\d{2}) ([a-fA-F\d]+)\s*$", line);
|
||||||
if (not match):
|
if not match:
|
||||||
raise Exception("%s:%d:E syntax error: " % (snapshotfile, n))
|
raise Exception("%s:%d:E syntax error: " % (snapshotfile, n))
|
||||||
return {"type": "snapshot",
|
return { "type": "snapshot",
|
||||||
"date": match.group(2),
|
"date": match.group(2),
|
||||||
"rev": match.group(3)}
|
"rev": match.group(3) }
|
||||||
|
|
||||||
|
|
||||||
def partial_snapshot_name(date, rev, platform):
|
def partial_snapshot_name(date, rev, platform):
|
||||||
return ("rust-stage0-%s-%s-%s.tar.bz2"
|
return ("rust-stage0-%s-%s-%s.tar.bz2"
|
||||||
% (date, rev, platform))
|
% (date, rev, platform))
|
||||||
|
|
||||||
def full_snapshot_name(date, rev, platform, hsh):
|
def full_snapshot_name(date, rev, platform, hsh):
|
||||||
return ("rust-stage0-%s-%s-%s-%s.tar.bz2"
|
return ("rust-stage0-%s-%s-%s-%s.tar.bz2"
|
||||||
% (date, rev, platform, hsh))
|
% (date, rev, platform, hsh))
|
||||||
|
|
||||||
|
|
||||||
def get_kernel(triple):
|
def get_kernel(triple):
|
||||||
@ -78,23 +85,22 @@ def get_kernel(triple):
|
|||||||
def get_cpu(triple):
|
def get_cpu(triple):
|
||||||
arch = triple.split('-')[0]
|
arch = triple.split('-')[0]
|
||||||
if arch == "i686":
|
if arch == "i686":
|
||||||
return "i386"
|
return "i386"
|
||||||
return arch
|
return arch
|
||||||
|
|
||||||
def get_platform(triple):
|
def get_platform(triple):
|
||||||
return "%s-%s" % (get_kernel(triple), get_cpu(triple))
|
return "%s-%s" % (get_kernel(triple), get_cpu(triple))
|
||||||
|
|
||||||
|
|
||||||
def cmd_out(cmdline):
|
def cmd_out(cmdline):
|
||||||
p = subprocess.Popen(cmdline,
|
p = subprocess.Popen(cmdline, stdout=subprocess.PIPE)
|
||||||
stdout=subprocess.PIPE)
|
|
||||||
return scrub(p.communicate()[0].strip())
|
return scrub(p.communicate()[0].strip())
|
||||||
|
|
||||||
|
|
||||||
def local_rev_info(field):
|
def local_rev_info(field):
|
||||||
return cmd_out(["git", "--git-dir=" + os.path.join(src_dir, ".git"),
|
return cmd_out(["git", "--git-dir=" + os.path.join(src_dir, ".git"),
|
||||||
"log", "-n", "1",
|
"log", "-n", "1",
|
||||||
"--format=%%%s" % field, "HEAD"])
|
"--format=%%%s" % field, "HEAD"])
|
||||||
|
|
||||||
|
|
||||||
def local_rev_full_sha():
|
def local_rev_full_sha():
|
||||||
@ -127,10 +133,10 @@ def get_url_to_file(u,f):
|
|||||||
os.rename(tmpf, f)
|
os.rename(tmpf, f)
|
||||||
|
|
||||||
def snap_filename_hash_part(snap):
|
def snap_filename_hash_part(snap):
|
||||||
match = re.match(r".*([a-fA-F\d]{40}).tar.bz2$", snap)
|
match = re.match(r".*([a-fA-F\d]{40}).tar.bz2$", snap)
|
||||||
if not match:
|
if not match:
|
||||||
raise Exception("unable to find hash in filename: " + snap)
|
raise Exception("unable to find hash in filename: " + snap)
|
||||||
return match.group(1)
|
return match.group(1)
|
||||||
|
|
||||||
def hash_file(x):
|
def hash_file(x):
|
||||||
h = sha_func()
|
h = sha_func()
|
||||||
@ -142,13 +148,13 @@ def get_winnt_runtime_deps():
|
|||||||
runtime_deps = []
|
runtime_deps = []
|
||||||
path_dirs = os.environ["PATH"].split(';')
|
path_dirs = os.environ["PATH"].split(';')
|
||||||
for name in winnt_runtime_deps:
|
for name in winnt_runtime_deps:
|
||||||
for dir in path_dirs:
|
for dir in path_dirs:
|
||||||
matches = glob.glob(os.path.join(dir, name))
|
matches = glob.glob(os.path.join(dir, name))
|
||||||
if matches:
|
if matches:
|
||||||
runtime_deps.append(matches[0])
|
runtime_deps.append(matches[0])
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise Exception("Could not find runtime dependency: %s" % name)
|
raise Exception("Could not find runtime dependency: %s" % name)
|
||||||
return runtime_deps
|
return runtime_deps
|
||||||
|
|
||||||
def make_snapshot(stage, triple):
|
def make_snapshot(stage, triple):
|
||||||
@ -160,31 +166,31 @@ def make_snapshot(stage, triple):
|
|||||||
file0 = partial_snapshot_name(date, rev, platform)
|
file0 = partial_snapshot_name(date, rev, platform)
|
||||||
|
|
||||||
def in_tar_name(fn):
|
def in_tar_name(fn):
|
||||||
cs = re.split(r"[\\/]", fn)
|
cs = re.split(r"[\\/]", fn)
|
||||||
if len(cs) >= 2:
|
if len(cs) >= 2:
|
||||||
return os.sep.join(cs[-2:])
|
return os.sep.join(cs[-2:])
|
||||||
|
|
||||||
tar = tarfile.open(file0, "w:bz2")
|
tar = tarfile.open(file0, "w:bz2")
|
||||||
|
|
||||||
for name in snapshot_files[kernel]:
|
for name in snapshot_files[kernel]:
|
||||||
dir = stage
|
dir = stage
|
||||||
if stage == "stage1" and re.match(r"^lib/(lib)?std.*", name):
|
if stage == "stage1" and re.match(r"^lib/(lib)?std.*", name):
|
||||||
dir = "stage0"
|
dir = "stage0"
|
||||||
fn_glob = os.path.join(triple, dir, name)
|
fn_glob = os.path.join(triple, dir, name)
|
||||||
matches = glob.glob(fn_glob)
|
matches = glob.glob(fn_glob)
|
||||||
if not matches:
|
if not matches:
|
||||||
raise Exception("Not found file with name like " + fn_glob)
|
raise Exception("Not found file with name like " + fn_glob)
|
||||||
if len(matches) == 1:
|
if len(matches) == 1:
|
||||||
tar.add(matches[0], "rust-stage0/" + in_tar_name(matches[0]))
|
tar.add(matches[0], "rust-stage0/" + in_tar_name(matches[0]))
|
||||||
else:
|
else:
|
||||||
raise Exception("Found stale files: \n %s\n"
|
raise Exception("Found stale files: \n %s\n"
|
||||||
"Please make a clean build." % "\n ".join(matches))
|
"Please make a clean build." % "\n ".join(matches))
|
||||||
|
|
||||||
if kernel=="winnt":
|
if kernel=="winnt":
|
||||||
for path in get_winnt_runtime_deps():
|
for path in get_winnt_runtime_deps():
|
||||||
tar.add(path, "rust-stage0/bin/" + os.path.basename(path))
|
tar.add(path, "rust-stage0/bin/" + os.path.basename(path))
|
||||||
tar.add(os.path.join(os.path.dirname(__file__), "third-party"),
|
tar.add(os.path.join(os.path.dirname(__file__), "third-party"),
|
||||||
"rust-stage0/bin/third-party")
|
"rust-stage0/bin/third-party")
|
||||||
|
|
||||||
tar.close()
|
tar.close()
|
||||||
|
|
||||||
@ -196,59 +202,59 @@ def make_snapshot(stage, triple):
|
|||||||
return file1
|
return file1
|
||||||
|
|
||||||
def curr_snapshot_rev():
|
def curr_snapshot_rev():
|
||||||
i = 0
|
i = 0
|
||||||
found_snap = False
|
found_snap = False
|
||||||
date = None
|
date = None
|
||||||
rev = None
|
rev = None
|
||||||
|
|
||||||
f = open(snapshotfile)
|
f = open(snapshotfile)
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
i += 1
|
i += 1
|
||||||
parsed = parse_line(i, line)
|
parsed = parse_line(i, line)
|
||||||
if (not parsed): continue
|
if (not parsed): continue
|
||||||
|
|
||||||
if parsed["type"] == "snapshot":
|
if parsed["type"] == "snapshot":
|
||||||
date = parsed["date"]
|
date = parsed["date"]
|
||||||
rev = parsed["rev"]
|
rev = parsed["rev"]
|
||||||
found_snap = True
|
found_snap = True
|
||||||
break
|
break
|
||||||
|
|
||||||
if not found_snap:
|
if not found_snap:
|
||||||
raise Exception("no snapshot entries in file")
|
raise Exception("no snapshot entries in file")
|
||||||
|
|
||||||
return (date, rev)
|
return (date, rev)
|
||||||
|
|
||||||
def determine_curr_snapshot(triple):
|
def determine_curr_snapshot(triple):
|
||||||
i = 0
|
i = 0
|
||||||
platform = get_platform(triple)
|
platform = get_platform(triple)
|
||||||
|
|
||||||
found_file = False
|
found_file = False
|
||||||
found_snap = False
|
found_snap = False
|
||||||
hsh = None
|
hsh = None
|
||||||
date = None
|
date = None
|
||||||
rev = None
|
rev = None
|
||||||
|
|
||||||
f = open(snapshotfile)
|
f = open(snapshotfile)
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
i += 1
|
i += 1
|
||||||
parsed = parse_line(i, line)
|
parsed = parse_line(i, line)
|
||||||
if (not parsed): continue
|
if (not parsed): continue
|
||||||
|
|
||||||
if found_snap and parsed["type"] == "file":
|
if found_snap and parsed["type"] == "file":
|
||||||
if parsed["platform"] == platform:
|
if parsed["platform"] == platform:
|
||||||
hsh = parsed["hash"]
|
hsh = parsed["hash"]
|
||||||
found_file = True
|
found_file = True
|
||||||
break;
|
break;
|
||||||
elif parsed["type"] == "snapshot":
|
elif parsed["type"] == "snapshot":
|
||||||
date = parsed["date"]
|
date = parsed["date"]
|
||||||
rev = parsed["rev"]
|
rev = parsed["rev"]
|
||||||
found_snap = True
|
found_snap = True
|
||||||
|
|
||||||
if not found_snap:
|
if not found_snap:
|
||||||
raise Exception("no snapshot entries in file")
|
raise Exception("no snapshot entries in file")
|
||||||
|
|
||||||
if not found_file:
|
if not found_file:
|
||||||
raise Exception("no snapshot file found for platform %s, rev %s" %
|
raise Exception("no snapshot file found for platform %s, rev %s" %
|
||||||
(platform, rev))
|
(platform, rev))
|
||||||
|
|
||||||
return full_snapshot_name(date, rev, platform, hsh)
|
return full_snapshot_name(date, rev, platform, hsh)
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# xfail-license
|
#
|
||||||
|
# Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
#
|
#
|
||||||
# this script attempts to turn doc comment attributes (#[doc = "..."])
|
# this script attempts to turn doc comment attributes (#[doc = "..."])
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
# Copyright 2010-2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
# xfail-license
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
import sys, fileinput, subprocess, re
|
import sys, fileinput, subprocess, re
|
||||||
from licenseck import *
|
from licenseck import *
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# xfail-license
|
#
|
||||||
|
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
# This digests UnicodeData.txt and DerivedCoreProperties.txt and emits rust
|
# This digests UnicodeData.txt and DerivedCoreProperties.txt and emits rust
|
||||||
# code covering the core properties. Since this is a pretty rare event we
|
# code covering the core properties. Since this is a pretty rare event we
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# xfail-license
|
#
|
||||||
|
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
# This creates the tables used for distributions implemented using the
|
# This creates the tables used for distributions implemented using the
|
||||||
# ziggurat algorithm in `std::rand::distributions;`. They are
|
# ziggurat algorithm in `std::rand::distributions;`. They are
|
||||||
|
Loading…
Reference in New Issue
Block a user