* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-11 23:47 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-11-11 23:47 UTC (permalink / raw
To: gentoo-commits
commit: adbba3719103cc972d2b2f88d6188b1b24c6331e
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 18:55:37 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Nov 11 18:55:37 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=adbba371
whitespace cleanup
---
main.py | 98 +++++++++++++++++++++++++++++++-------------------------------
1 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/main.py b/main.py
index f5f35be..a70272f 100755
--- a/main.py
+++ b/main.py
@@ -49,20 +49,20 @@ class Output(object):
def __init__(self, verbosity=1, out=sys.stderr):
esc_seq = "\x1b["
codes = {}
-
+
codes["reset"] = esc_seq + "39;49;00m"
codes["bold"] = esc_seq + "01m"
codes["blue"] = esc_seq + "34;01m"
codes["green"] = esc_seq + "32;01m"
codes["yellow"] = esc_seq + "33;01m"
codes["red"] = esc_seq + "31;01m"
-
+
self.codes = codes
del codes
-
+
self.verbosity = verbosity
self.file = out
-
+
def red(self, text):
return self.codes["red"]+text+self.codes["reset"]
@@ -77,26 +77,26 @@ class Output(object):
def yellow(self, text):
return self.codes["yellow"]+text+self.codes["reset"]
-
+
def print_info(self, message, level=1):
"""Prints an info message with a green star, like einfo."""
if level <= self.verbosity:
self.file.write('\r' + self.green('* ') + message)
self.file.flush()
-
+
def print_warn(self, message, level=1):
"""Prints a warning."""
if level <= self.verbosity:
self.file.write(self.yellow('Warning: ') + message)
self.file.flush()
-
+
def print_err(self, message, level=0):
"""prints an error message with a big red ERROR."""
if level <= self.verbosity:
self.file.write(self.red('\nERROR: ') + message + '\n')
self.file.flush()
sys.exit(1)
-
+
def write(self, message, level=1):
"""A wrapper arounf stderr.write, to enforce verbosity settings."""
if level <= self.verbosity:
@@ -149,7 +149,7 @@ class Extractor(object):
def __init__(self, list_url, options):
parser = MirrorParser3()
self.hosts = []
-
+
hosts = self.getlist(parser, list_url)
output.write('Extractor(): fetched mirrors.xml,'
' %s hosts before filtering\n' % len(hosts), 2)
@@ -170,17 +170,17 @@ class Extractor(object):
myhosts = []
output.print_info('Limiting test to %s hosts. ' % prot )
-
+
for host in hosts:
if host[0].startswith(prot):
myhosts.append(host)
-
+
output.write('%s of %s removed.\n' % (len(hosts) - len(myhosts),
len(hosts)) )
-
+
return myhosts
-
-
+
+
def getlist(self, parser, url):
"""
Uses the supplied parser to get a list of urls.
@@ -188,7 +188,7 @@ class Extractor(object):
"""
output.write('getlist(): fetching ' + url + '\n', 2)
-
+
output.print_info('Downloading a list of mirrors...')
try:
@@ -210,7 +210,7 @@ class Shallow(object):
def __init__(self, hosts, options):
self.urls = []
-
+
if options.blocksize is not None:
self.netselect_split(hosts, options.servers,
options.blocksize)
@@ -230,7 +230,7 @@ class Shallow(object):
hosts = [host[0] for host in hosts]
top_host_dict = {}
top_hosts = []
-
+
if not quiet:
output.print_info('Using netselect to choose the top %d mirrors...' \
% number)
@@ -254,13 +254,13 @@ class Shallow(object):
continue
top_hosts.append(line[1])
top_host_dict[line[0]] = line[1]
-
+
if not quiet:
output.write('Done.\n')
output.write('\nnetselect(): returning %s and %s\n' % (top_hosts,
top_host_dict), 2)
-
+
if quiet:
return top_hosts, top_host_dict
else:
@@ -273,31 +273,31 @@ class Shallow(object):
This is done in a tournament style.
"""
hosts = [host[0] for host in hosts]
-
+
output.write('netselect_split() got %s hosts.\n' % len(hosts), 2)
-
+
host_blocks = self.host_blocks(hosts, block_size)
-
+
output.write(' split into %s blocks\n' % len(host_blocks), 2)
-
+
top_hosts = []
ret_hosts = {}
-
+
block_index = 0
for block in host_blocks:
output.print_info('Using netselect to choose the top '
'%d hosts, in blocks of %s. %s of %s blocks complete.'
% (number, block_size, block_index, len(host_blocks)))
-
+
host_dict = self.netselect(block, len(block), quiet=True)[1]
-
+
output.write('ran netselect(%s, %s), and got %s\n' % (block, len(block),
host_dict), 2)
-
+
for key in host_dict.keys():
ret_hosts[key] = host_dict[key]
block_index += 1
-
+
sys.stderr.write('\rUsing netselect to choose the top'
'%d hosts, in blocks of %s. %s of %s blocks complete.\n'
% (number, block_size, block_index, len(host_blocks)))
@@ -307,9 +307,9 @@ class Shallow(object):
for rank in host_ranking_keys[:number]:
top_hosts.append(ret_hosts[rank])
-
+
output.write('netselect_split(): returns %s\n' % top_hosts, 2)
-
+
self.urls = top_hosts
@@ -320,7 +320,7 @@ class Shallow(object):
"""
host_array = []
mylist = []
-
+
while len(hosts) > block_size:
while (len(mylist) < block_size):
mylist.append(hosts.pop())
@@ -372,11 +372,11 @@ class Deep(object):
num_hosts = len(hosts)
for host in hosts:
-
+
prog += 1
output.print_info('Downloading 100k files from each mirror... [%s of %s]'\
% (prog, num_hosts) )
-
+
mytime, ignore = self.deeptime(host, maxtime)
if not ignore and mytime < maxtime:
@@ -384,10 +384,10 @@ class Deep(object):
maxtime, top_hosts, self._number)
else:
continue
-
+
output.write('deeptest(): got %s hosts, and returned %s\n' % (num_hosts, \
str(top_hosts.values())), 2)
-
+
output.write('\n') #this just makes output nicer
#can't just return the dict.valuse, because we want the fastest mirror first...
@@ -408,7 +408,7 @@ class Deep(object):
Like mine.
"""
output.write('\n_deeptime(): maxtime is %s\n' % maxtime, 2)
-
+
if url.endswith('/'): #append the path to the testfile to the URL
url = url + 'distfiles/mirrorselect-test'
else:
@@ -535,14 +535,14 @@ class Deep(object):
Returns the new maxtime, be it the specified timeout, or the slowest host.
"""
if len(host_dict) < maxlen: #still have room, and host is fast. add it.
-
+
output.write('_list_add(): added host %s. with a time of %s\n' %
(time_host[1], time_host[0]), 2)
-
+
host_dict.update(dict([time_host]))
times = host_dict.keys()
times.sort()
-
+
else: #We need to make room in the dict before we add. Kill the slowest.
output.write('_list_add(): Adding host %s with a time of %s\n' %
(time_host[1], time_host[0]), 2)
@@ -585,8 +585,8 @@ class Interactive(object):
if len(self.urls[0]) == 0:
sys.exit(1)
-
-
+
+
def interactive(self, hosts, options):
"""
Some sort of interactive menu thingy.
@@ -617,7 +617,7 @@ class Interactive(object):
mirror_fd = os.popen('%s' % codecs.encode(dialog, 'utf8'))
mirrors = mirror_fd.read()
mirror_fd.close()
-
+
self.urls = mirrors.rstrip().split('\n')
@@ -645,7 +645,7 @@ def write_config(hosts, out, path, sync=False):
var = 'SYNC'
else:
var = 'GENTOO_MIRRORS'
-
+
mirror_string = '%s="%s"' % (var, ' '.join(hosts))
if out:
@@ -665,12 +665,12 @@ def write_config(hosts, out, path, sync=False):
shutil.move(path, path + '.backup')
except IOError:
lines = []
-
+
regex = re.compile('^%s=.*' % var)
for line in lines:
if regex.match(line):
lines.remove(line)
-
+
lines.append(mirror_string)
output.write('\tWriting new make.conf\n')
@@ -693,7 +693,7 @@ def get_filesystem_mirrors(out, path, sync=False):
var = 'SYNC'
else:
var = 'GENTOO_MIRRORS'
-
+
try:
f = open(path,'r')
except IOError, e:
@@ -708,7 +708,7 @@ def get_filesystem_mirrors(out, path, sync=False):
key = lex.get_token()
if key == var:
equ = lex.get_token()
-
+
if (equ == ''):
break
elif (equ != '='):
@@ -847,10 +847,10 @@ def parse_args(argv):
output.print_err(
'You do not appear to have netselect on your system. '
'You must use the -D flag')
-
+
if (os.getuid() != 0) and not options.output:
output.print_err('Must be root to write to /etc/make.conf!\n')
-
+
if args:
output.print_err('Unexpected arguments passed.')
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-11 23:47 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-11-11 23:47 UTC (permalink / raw
To: gentoo-commits
commit: 79d5fb82b2d78e8f931d5759ec1c7ce747eb9edf
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 22:24:22 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Nov 11 22:37:16 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=79d5fb82
update for the new make.conf location as well as the old.
---
main.py | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/main.py b/main.py
index a70272f..1d01e6d 100755
--- a/main.py
+++ b/main.py
@@ -655,7 +655,7 @@ def write_config(hosts, out, path, sync=False):
output.write('\n')
- output.print_info('Modifying make.conf with new mirrors...\n')
+ output.print_info('Modifying %s with new mirrors...\n' % path)
try:
config = open(path, 'r')
output.write('\tReading make.conf\n')
@@ -673,7 +673,7 @@ def write_config(hosts, out, path, sync=False):
lines.append(mirror_string)
- output.write('\tWriting new make.conf\n')
+ output.write('\tWriting new %s\n' % path)
config = open(path, 'w')
for line in lines:
config.write(line)
@@ -732,7 +732,7 @@ def get_filesystem_mirrors(out, path, sync=False):
return fsmirrors
-def parse_args(argv):
+def parse_args(argv, config_path):
"""
Does argument parsing and some sanity checks.
Returns an optparse Options object.
@@ -745,7 +745,7 @@ def parse_args(argv):
"",
output.white(" automatic:"),
" # mirrorselect -s5",
- " # mirrorselect -s3 -b10 -o >> /mnt/gentoo/etc/make.conf",
+ " # mirrorselect -s3 -b10 -o >> /mnt/gentoo/etc/portage/make.conf",
" # mirrorselect -D -s4",
"",
output.white(" interactive:"),
@@ -792,7 +792,7 @@ def parse_args(argv):
"-o", "--output", action="store_true", default=False,
help="Output Only Mode, this is especially useful "
"when being used during installation, to redirect "
- "output to a file other than /etc/make.conf")
+ "output to a file other than %s" % config_path)
group.add_option(
"-b", "--blocksize", action="store", type="int",
help="This is to be used in automatic mode "
@@ -849,7 +849,7 @@ def parse_args(argv):
'You must use the -D flag')
if (os.getuid() != 0) and not options.output:
- output.print_err('Must be root to write to /etc/make.conf!\n')
+ output.print_err('Must be root to write to %s!\n' % config_path)
if args:
output.print_err('Unexpected arguments passed.')
@@ -858,14 +858,20 @@ def parse_args(argv):
return options
-output = Output() #the only FUCKING global. Damnit.
+output = Output() #the only FUCKING global. Damnit.
def main(argv):
"""Lets Rock!"""
- config_path = '/etc/make.conf'
-
+ # start with the new location
+ config_path = '/etc/portage/make.conf'
+ if not os.access(config_path, os.F_OK):
+ # check if the old location is what is used
+ if os.access('/etc/make.conf', os.F_OK):
+ config_path = '/etc/make.conf'
+
+ #output.print_info("config_path set to :", config_path)
signal.signal(signal.SIGINT, handler)
- options = parse_args(argv)
+ options = parse_args(argv, config_path)
output.verbosity = options.verbosity
fsmirrors = get_filesystem_mirrors(options.output, config_path, options.rsync)
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-12 0:50 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-11-12 0:50 UTC (permalink / raw
To: gentoo-commits
commit: ec2587bbfd41ccb84e62906448f3dcef9a1c45b3
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 12 00:49:17 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Nov 12 00:49:17 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=ec2587bb
update manpage, this and the previous commit fix bug 442654
---
mirrorselect.8 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mirrorselect.8 b/mirrorselect.8
index 21a929a..6003dfc 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -75,12 +75,12 @@ Autoselect the 5 best mirrors and save results in /etc/make.conf, a backup will
.LP
Autoselect the 3 best mirrors, use a
.I BLOCKSIZE
-of 10 and append the output to /etc/make.conf.
+of 10 and append the output to /etc/portage/make.conf.
.LP
-# mirrorselect -s3 -b10 -o >> /etc/make.conf
+# mirrorselect -s3 -b10 -o >> /etc/portage/make.conf
.LP
Autoselect the 4 best mirrors, it also loads a 100k file from each mirror.
-The result will be written to /etc/make.conf, a backup will be created.
+The result will be written to /etc/portage/make.conf, a backup will be created.
.LP
# mirrorselect -D -s4
.LP
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-12 7:46 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-11-12 7:46 UTC (permalink / raw
To: gentoo-commits
commit: 3501be308ddbe3063c6d448335ee1ad35d9ae06d
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 12 01:35:23 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Nov 12 07:23:08 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=3501be30
add a basic .gitignore
---
.gitignore | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f7a7e7e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.py[co]
+testing*
+test*
+*.geany
+build*
+.gitignore
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-12 15:56 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-11-12 15:56 UTC (permalink / raw
To: gentoo-commits
commit: cbe03f36f0b55f968301ec82e98db1151acb92e5
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 12 15:54:03 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Nov 12 15:54:03 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=cbe03f36
Initial setup.py copied/edited from gentoolkits setup.py
---
setup.py | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 119 insertions(+), 0 deletions(-)
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..db82dd7
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,119 @@
+#!/usr/bin/env python
+# coding: utf-8
+
+from __future__ import print_function
+
+
+import re
+import sys
+from distutils import core, log
+from glob import glob
+
+import os
+import io
+
+
+__version__ = os.getenv('VERSION', default='9999')
+
+cwd = os.getcwd()
+
+# establish the eprefix, initially set so eprefixify can
+# set it on install
+EPREFIX = "@GENTOO_PORTAGE_EPREFIX@"
+
+# check and set it if it wasn't
+if "GENTOO_PORTAGE_EPREFIX" in EPREFIX:
+ EPREFIX = ''
+
+
+# Python files that need `version = ""` subbed, relative to this dir:
+python_scripts = [os.path.join(cwd, path) for path in (
+ 'mirrorselect/version.py'
+)]
+
+
+class set_version(core.Command):
+ """Set python version to our __version__."""
+ description = "hardcode scripts' version using VERSION from environment"
+ user_options = [] # [(long_name, short_name, desc),]
+
+ def initialize_options (self):
+ pass
+
+ def finalize_options (self):
+ pass
+
+ def run(self):
+ ver = 'git' if __version__ == '9999' else __version__
+ print("Setting version to %s" % ver)
+ def sub(files, pattern):
+ for f in files:
+ updated_file = []
+ with io.open(f, 'r', 1, 'utf_8') as s:
+ for line in s:
+ newline = re.sub(pattern, '"%s"' % ver, line, 1)
+ if newline != line:
+ log.info("%s: %s" % (f, newline))
+ updated_file.append(newline)
+ with io.open(f, 'w', 1, 'utf_8') as s:
+ s.writelines(updated_file)
+ quote = r'[\'"]{1}'
+ python_re = r'(?<=^version = )' + quote + '[^\'"]*' + quote
+ sub(python_scripts, python_re)
+
+
+def load_test():
+ """Only return the real test class if it's actually being run so that we
+ don't depend on snakeoil just to install."""
+
+ desc = "run the test suite"
+ if 'test' in sys.argv[1:]:
+ try:
+ from snakeoil import distutils_extensions
+ except ImportError:
+ sys.stderr.write("Error: We depend on dev-python/snakeoil ")
+ sys.stderr.write("to run tests.\n")
+ sys.exit(1)
+ class test(distutils_extensions.test):
+ description = desc
+ default_test_namespace = 'mirrorselect.test'
+ else:
+ class test(core.Command):
+ description = desc
+
+ return test
+
+packages = [
+ str('.'.join(root.split(os.sep)[1:]))
+ for root, dirs, files in os.walk('mirrorselect')
+ if '__init__.py' in files
+]
+
+test_data = {
+ 'mirrorselect': [
+ ]
+}
+
+core.setup(
+ name='mirrorselect',
+ version=__version__,
+ description='Tool for selecting Gentoo source and rsync mirrors.',
+ author='',
+ author_email='',
+ maintainer='Gentoo Portage Tools Team',
+ maintainer_email='tools-portage@gentoo.org',
+ url='http://www.gentoo.org/proj/en/portage/tools/index.xml',
+ download_url='http://distfiles.gentoo.org/distfiles/mirrorselect-%s.tar.gz'\
+ % __version__,
+ package_dir={'': 'mirrorselect'},
+ packages=packages,
+ package_data = test_data,
+ scripts=(glob('bin/*')),
+ data_files=(
+ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man8'), 'mirrorselect.8'),
+ ),
+ cmdclass={
+ 'test': load_test(),
+ 'set_version': set_version,
+ },
+)
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-12 21:41 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-11-12 21:41 UTC (permalink / raw
To: gentoo-commits
commit: b0e7bd4e00d6c05a3a23108a251b45df4516a2f9
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 12 21:40:41 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Nov 12 21:40:41 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=b0e7bd4e
remove some uneeded import and use. fix man page install.
---
setup.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index db82dd7..e21af96 100755
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,6 @@ from __future__ import print_function
import re
import sys
from distutils import core, log
-from glob import glob
import os
import io
@@ -107,10 +106,10 @@ core.setup(
% __version__,
package_dir={'': 'mirrorselect'},
packages=packages,
- package_data = test_data,
- scripts=(glob('bin/*')),
+ #package_data = test_data,
+ scripts=(['bin/mirrorselect']),
data_files=(
- (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man8'), 'mirrorselect.8'),
+ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man8'), ['mirrorselect.8']),
),
cmdclass={
'test': load_test(),
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-14 18:06 Paul Varner
0 siblings, 0 replies; 23+ messages in thread
From: Paul Varner @ 2012-11-14 18:06 UTC (permalink / raw
To: gentoo-commits
commit: 4b07178a95b39a6ed52601e9cca94d6d84e59623
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 14 18:03:06 2012 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Wed Nov 14 18:03:06 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=4b07178a
Fix setup.py to create the mirrorselect module correctly.
---
setup.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index e21af96..e925825 100755
--- a/setup.py
+++ b/setup.py
@@ -84,7 +84,7 @@ def load_test():
packages = [
str('.'.join(root.split(os.sep)[1:]))
- for root, dirs, files in os.walk('mirrorselect')
+ for root, dirs, files in os.walk('.')
if '__init__.py' in files
]
@@ -104,7 +104,6 @@ core.setup(
url='http://www.gentoo.org/proj/en/portage/tools/index.xml',
download_url='http://distfiles.gentoo.org/distfiles/mirrorselect-%s.tar.gz'\
% __version__,
- package_dir={'': 'mirrorselect'},
packages=packages,
#package_data = test_data,
scripts=(['bin/mirrorselect']),
@@ -116,3 +115,4 @@ core.setup(
'set_version': set_version,
},
)
+
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-14 18:18 Paul Varner
0 siblings, 0 replies; 23+ messages in thread
From: Paul Varner @ 2012-11-14 18:18 UTC (permalink / raw
To: gentoo-commits
commit: 316519bd018e0762f435f87cba65250aad91f465
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 14 18:15:12 2012 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Wed Nov 14 18:15:12 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=316519bd
Fix python_scripts to properly create the list of scripts for set_version.
---
setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index e925825..60b048d 100755
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@ if "GENTOO_PORTAGE_EPREFIX" in EPREFIX:
# Python files that need `version = ""` subbed, relative to this dir:
python_scripts = [os.path.join(cwd, path) for path in (
- 'mirrorselect/version.py'
+ 'mirrorselect/version.py',
)]
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-11-14 18:25 Paul Varner
0 siblings, 0 replies; 23+ messages in thread
From: Paul Varner @ 2012-11-14 18:25 UTC (permalink / raw
To: gentoo-commits
commit: 6233f83ccce926a93d5c5ade43c62196c0fe3e78
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 14 18:22:38 2012 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Wed Nov 14 18:22:38 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=6233f83c
Hardcode the mirrorselect package, so setup.py doesn't get confused by
multiple builds.
---
setup.py | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/setup.py b/setup.py
index 60b048d..01e7c5c 100755
--- a/setup.py
+++ b/setup.py
@@ -82,12 +82,6 @@ def load_test():
return test
-packages = [
- str('.'.join(root.split(os.sep)[1:]))
- for root, dirs, files in os.walk('.')
- if '__init__.py' in files
-]
-
test_data = {
'mirrorselect': [
]
@@ -104,7 +98,7 @@ core.setup(
url='http://www.gentoo.org/proj/en/portage/tools/index.xml',
download_url='http://distfiles.gentoo.org/distfiles/mirrorselect-%s.tar.gz'\
% __version__,
- packages=packages,
+ packages=['mirrorselect'],
#package_data = test_data,
scripts=(['bin/mirrorselect']),
data_files=(
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-12-15 20:26 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-12-15 20:26 UTC (permalink / raw
To: gentoo-commits
commit: 05a6754b6c7bc9e668d931e8d4249deefbc8e98f
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 15 20:25:53 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Dec 15 20:25:53 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=05a6754b
Add the manpage to be updated with the new version
---
setup.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/setup.py b/setup.py
index 01e7c5c..8a9f980 100755
--- a/setup.py
+++ b/setup.py
@@ -30,6 +30,10 @@ python_scripts = [os.path.join(cwd, path) for path in (
'mirrorselect/version.py',
)]
+manpage = [os.path.join(cwd, path) for path in (
+ 'mirrorselect.8',
+)]
+
class set_version(core.Command):
"""Set python version to our __version__."""
@@ -59,6 +63,8 @@ class set_version(core.Command):
quote = r'[\'"]{1}'
python_re = r'(?<=^version = )' + quote + '[^\'"]*' + quote
sub(python_scripts, python_re)
+ man_re = r'(?<=^.TH "mirrorselect" "8" )' + quote + '[^\'"]*' + quote
+ sub(manpage, man_re)
def load_test():
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-12-15 22:31 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-12-15 22:31 UTC (permalink / raw
To: gentoo-commits
commit: 15fa0aff63165ad39ed5419ed5cfbb3a6cadcdc0
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 15 22:31:08 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Dec 15 22:31:08 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=15fa0aff
add a README to quite a setup.py warning.
---
README | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/README b/README
new file mode 100644
index 0000000..da1c5da
--- /dev/null
+++ b/README
@@ -0,0 +1,13 @@
+Package: app-portage/mirrorselect
+Authors:
+ Copyright (C) 2005 Colin Kingsley <tercel@gentoo.org>
+ Copyright (C) 2008 Zac Medico <zmedico@gentoo.org>
+ Copyright (C) 2009 Sebastian Pipping <sebastian@pipping.org>
+ Copyright (C) 2009 Christian Ruppert <idl0r@gentoo.org>
+ Copyright (C) 2012 Brian Dolbec <dolsen@gentoo.org>
+
+Mirrorselect is a small utility script to help select the mirror(s)
+to use for fetching the distfiles to install packages in a
+gentoo or gentoo-based linux system.
+
+See the mirrorselect manpage for usage instructions.
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-12-16 4:48 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-12-16 4:48 UTC (permalink / raw
To: gentoo-commits
commit: bc0efc857b5708ea572e3a4c57c9689cf48c50ad
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 16 04:48:17 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Dec 16 04:48:17 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=bc0efc85
Fix setup.py to use PVR instead of VERSION from the environment so that egg-info is set correctly during the merge.
---
setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index 8a9f980..7a53076 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ import os
import io
-__version__ = os.getenv('VERSION', default='9999')
+__version__ = os.getenv('PVR', default='9999')
cwd = os.getcwd()
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2012-12-16 6:02 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2012-12-16 6:02 UTC (permalink / raw
To: gentoo-commits
commit: 3c8551569c74743c6e8ac705fd11b9b20a509c0d
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 16 06:02:27 2012 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Dec 16 06:02:27 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=3c855156
Fix setup.py's __version__ so either VERSION or PVR will assign the version so repoman won't complain.
---
setup.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index 7a53076..32c7e1d 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ import os
import io
-__version__ = os.getenv('PVR', default='9999')
+__version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
cwd = os.getcwd()
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2013-03-10 13:07 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2013-03-10 13:07 UTC (permalink / raw
To: gentoo-commits
commit: 1776315629af75e362411b2f3238c43f987030ce
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 10 13:02:55 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Mar 10 13:02:55 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=17763156
Fix make.conf manpage references.
---
mirrorselect.8 | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/mirrorselect.8 b/mirrorselect.8
index 6003dfc..db5f105 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -53,7 +53,7 @@ Debug mode.
.TP
.B \-o, \-\-output
Output Only Mode, this is especially useful when being used during installation,
-to redirect output to a file other than /etc/make.conf
+to redirect output to a file other than /etc/portage/make.conf
.TP
.B \-q, \-\-quiet
Quiet mode.
@@ -69,7 +69,8 @@ Timeout for deep mode. Defaults to 10 seconds.
automatic:
.LP
.RS 8
-Autoselect the 5 best mirrors and save results in /etc/make.conf, a backup will be created.
+Autoselect the 5 best mirrors and save results in /etc/portage/make.conf,
+a backup will be created.
.LP
# mirrorselect -s5
.LP
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2013-10-18 14:26 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2013-10-18 14:26 UTC (permalink / raw
To: gentoo-commits
commit: 918b397cc1ee25f761b5604bf71af01ab33e79b8
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 18 14:19:39 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Oct 18 14:24:03 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=918b397c
Give proper credit to for the last commits changes
Merge branch 'master' of
git+ssh://git.overlays.gentoo.org/proj/mirrorselect
^ permalink raw reply [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
2014-01-31 15:44 [gentoo-commits] proj/mirrorselect:ssl " Brian Dolbec
@ 2014-03-02 7:44 ` Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2014-03-02 7:44 UTC (permalink / raw
To: gentoo-commits
commit: 58cc4f18d1232c18c90666522b21356f2722c1da
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 14 17:01:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Jan 14 17:01:03 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=58cc4f18
Manpage updates
---
mirrorselect.8 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/mirrorselect.8 b/mirrorselect.8
index db5f105..73a84fc 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -40,13 +40,15 @@ ftp only mode. Will not consider hosts of other types.
http only mode. Will not consider hosts of other types.
.TP
.B \-r, \-\-rsync
-rsync mode. Allows you to interactively select your rsync mirror. Requires -i to be used.
+rsync mode. Allows you to interactively select your rsync mirror.
+ Requires -i to be used.
.SS "Other options"
.TP
.BI \-b " BLOCKSIZE " "\fR,\fP \-blocksize" " BLOCKSIZE "
This is to be used in automatic mode and will split the hosts into blocks of
BLOCKSIZE for use with netselect. This is required for certain routers which
-block 40+ requests at any given time. Recommended parameters to pass are: -s 3 -b 10
+block 40+ requests at any given time.
+Recommended parameters to pass are: -s 3 -b 10
.TP
.B \-d, \-\-debug
Debug mode.
@@ -103,6 +105,10 @@ Zac Medico <zmedico@gentoo.org>
Sebastian Pipping <sebastian@pipping.org>
.LP
Christian Ruppert <idl0r@gentoo.org>
+.LP
+Brian Dolbec <dolsen@gentoo.org>
+.LP
+Douglas Freed <dwfreed@mtu.edu>
.SH "BUGS"
Please report any bugs to http://bugs.gentoo.org
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2014-05-05 2:04 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2014-05-05 2:04 UTC (permalink / raw
To: gentoo-commits
commit: cdd00e0e5d2b305f1d7e94dab0414a3e8a715487
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon May 5 02:01:26 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon May 5 02:01:26 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=cdd00e0e
Update man page with new options
---
mirrorselect.8 | 46 ++++++++++++++++++++++++++++++++++++++--------
1 file changed, 38 insertions(+), 8 deletions(-)
diff --git a/mirrorselect.8 b/mirrorselect.8
index 73a84fc..6d4bf16 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -17,11 +17,11 @@ Print a usage summary and exit.
Show program's version number and exit.
.SS "Main modes"
.TP
-.B \-4, \-\-ipv4
-only use IPv4.
-.TP
-.B \-6, \-\-ipv6
-only use IPv6.
+.B \-a, \-\-all
+This will present a list of all filtered search results
+to make it possible to select mirrors you wish to use.
+For the -r, --rsync option, it will select the rotation server
+only. As multiple rsync URL's are not supported.
.TP
.B \-D, \-\-deep
Deep mode. This is used to give a more accurate speed test. It will download
@@ -33,6 +33,11 @@ Interactive Mode, this will present a list to make it possible to select mirrors
you wish to use.
.SS "Server type selection (choose at most one)"
.TP
+.BI \-c " COUNTRY " "\fR,\fP \-\-country " COUNTRY "
+Only use mirrors from the specified country.
+NOTE: Names with a space must be quoted
+ eg.: -c 'South Korea'
+.TP
.B \-F, \-\-ftp
ftp only mode. Will not consider hosts of other types.
.TP
@@ -42,20 +47,45 @@ http only mode. Will not consider hosts of other types.
.B \-r, \-\-rsync
rsync mode. Allows you to interactively select your rsync mirror.
Requires -i to be used.
+.TP
+.BI \-R " REGION " "\fR,\fP \-\-region " REGION "
+Only use mirrors from the specified region.
+NOTE: Names with a space must be quoted.
+ eg.: -R 'North America'
+.TP
+.B \-4, \-\-ipv4
+only use IPv4.
+.TP
+.B \-6, \-\-ipv6
+only use IPv6.
.SS "Other options"
.TP
-.BI \-b " BLOCKSIZE " "\fR,\fP \-blocksize" " BLOCKSIZE "
+.BI \-b " BLOCKSIZE " "\fR,\fP \-\-blocksize" " BLOCKSIZE "
This is to be used in automatic mode and will split the hosts into blocks of
BLOCKSIZE for use with netselect. This is required for certain routers which
block 40+ requests at any given time.
Recommended parameters to pass are: -s 3 -b 10
.TP
-.B \-d, \-\-debug
+.BI \-d " VERBOSITY " "\fR,\fP \-\-debug " VERBOSITY "
Debug mode.
.TP
+.BI \-f " FILE " "\fR,\fP \-\-file "FILE "
+An alternate file to download for deep testing. Please
+choose the file carefully as to not abuse the system
+by selecting an overly large size file. You must also
+use the -m, --md5 option.
+.TP
+.BI \-m " MD5 " "\fR,\fP \-\-md5 " MD5 "
+An alternate file md5sum value used to compare the
+downloaded file against for deep testing.
+.TP
.B \-o, \-\-output
Output Only Mode, this is especially useful when being used during installation,
-to redirect output to a file other than /etc/portage/make.conf
+to redirect output to a file other than /etc/portage/make.conf.
+.TP
+.BI \-P " PROXY " "\fR,\fP \-\-proxy " PROXY "
+Proxy server to use if not the default proxy in the
+environment.
.TP
.B \-q, \-\-quiet
Quiet mode.
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2014-05-29 16:32 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2014-05-29 16:32 UTC (permalink / raw
To: gentoo-commits
commit: 2bcf8e4b27475680ffe3b6144f871787653ef6e2
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu May 29 16:31:40 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu May 29 16:31:40 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=2bcf8e4b
Update version for the release
---
mirrorselect.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mirrorselect.8 b/mirrorselect.8
index 6d4bf16..cd7b8bb 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -1,4 +1,4 @@
-.TH "mirrorselect" "8" "2.1.0"
+.TH "mirrorselect" "8" "2.2.2"
.SH "NAME"
.LP
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2019-02-13 8:43 Zac Medico
0 siblings, 0 replies; 23+ messages in thread
From: Zac Medico @ 2019-02-13 8:43 UTC (permalink / raw
To: gentoo-commits
commit: 7d5fd760f68c19156a6766cdea77c291513cac12
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 13 08:40:52 2019 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Feb 13 08:42:04 2019 +0000
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=7d5fd760
setup.py: extend sdist to archive files owned by root
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
setup.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/setup.py b/setup.py
index df7b851..919dcce 100755
--- a/setup.py
+++ b/setup.py
@@ -7,6 +7,7 @@ from __future__ import print_function
import re
import sys
from distutils import core, log
+from distutils.command.sdist import sdist
import os
import io
@@ -67,6 +68,18 @@ class set_version(core.Command):
sub(manpage, man_re)
+class x_sdist(sdist):
+ """sdist defaulting to archive files owned by root."""
+
+ def finalize_options(self):
+ if self.owner is None:
+ self.owner = 'root'
+ if self.group is None:
+ self.group = 'root'
+
+ sdist.finalize_options(self)
+
+
def load_test():
"""Only return the real test class if it's actually being run so that we
don't depend on snakeoil just to install."""
@@ -113,6 +126,7 @@ core.setup(
),
cmdclass={
'test': load_test(),
+ 'sdist': x_sdist,
'set_version': set_version,
},
)
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2022-05-31 4:08 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2022-05-31 4:08 UTC (permalink / raw
To: gentoo-commits
commit: 4cd4fb6280433f301ad9159f7473dc32ceb063d6
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue May 31 04:05:26 2022 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue May 31 04:05:26 2022 +0000
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=4cd4fb62
setup.py: Migrate from deprecated distutils to setuptools
Gentoo-bug-url: https://bugs.gentoo.org/841131
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
setup.py | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/setup.py b/setup.py
index 5571711..7c4165c 100755
--- a/setup.py
+++ b/setup.py
@@ -6,13 +6,10 @@ from __future__ import print_function
import re
import sys
-from distutils import core, log
-from distutils.command.sdist import sdist
-from distutils.core import Command
-
import os
import io
import unittest
+from setuptools import setup, Command
__version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
@@ -38,7 +35,7 @@ manpage = [os.path.join(cwd, path) for path in (
)]
-class set_version(core.Command):
+class set_version(Command):
"""Set python version to our __version__."""
description = "hardcode scripts' version using VERSION from environment"
user_options = [] # [(long_name, short_name, desc),]
@@ -70,18 +67,6 @@ class set_version(core.Command):
sub(manpage, man_re)
-class x_sdist(sdist):
- """sdist defaulting to archive files owned by root."""
-
- def finalize_options(self):
- if self.owner is None:
- self.owner = 'root'
- if self.group is None:
- self.group = 'root'
-
- sdist.finalize_options(self)
-
-
class TestCommand(Command):
user_options = []
@@ -105,7 +90,7 @@ test_data = {
]
}
-core.setup(
+setup(
name='mirrorselect',
version=__version__,
description='Tool for selecting Gentoo source and rsync mirrors.',
@@ -125,7 +110,6 @@ core.setup(
),
cmdclass={
'test': TestCommand,
- 'sdist': x_sdist,
'set_version': set_version,
},
)
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2022-05-31 18:56 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2022-05-31 18:56 UTC (permalink / raw
To: gentoo-commits
commit: 68a8b09d7dfd5d36c79b1076fff73c0e51613b45
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue May 31 18:55:35 2022 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue May 31 18:55:35 2022 +0000
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=68a8b09d
setup.py: Fix logging in set_version
Fixes regresiion in 4cd4fb6280433f301ad9159f7473dc32ceb063d6
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 7c4165c..0d68f07 100755
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,7 @@
from __future__ import print_function
+import logging
import re
import sys
import os
@@ -56,7 +57,7 @@ class set_version(Command):
for line in s:
newline = re.sub(pattern, '"%s"' % ver, line, 1)
if newline != line:
- log.info("%s: %s" % (f, newline))
+ logging.info("%s: %s" % (f, newline))
updated_file.append(newline)
with io.open(f, 'w', 1, 'utf_8') as s:
s.writelines(updated_file)
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2022-07-10 21:16 Brian Dolbec
0 siblings, 0 replies; 23+ messages in thread
From: Brian Dolbec @ 2022-07-10 21:16 UTC (permalink / raw
To: gentoo-commits
commit: 5444d0ddb5268325aac63dcdeb908b614916dd0f
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 10 20:54:45 2022 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Jul 10 20:54:45 2022 +0000
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=5444d0dd
Revert "setup.py: Migrate from deprecated distutils to setuptools"
This reverts commit 4cd4fb6280433f301ad9159f7473dc32ceb063d6.
setuptools is installing data_file to the pkg dir inside python.
Reverting back to distutils for correct install for now.
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
setup.py | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/setup.py b/setup.py
index 9111d5e..a9728fa 100755
--- a/setup.py
+++ b/setup.py
@@ -5,10 +5,13 @@
import logging
import re
import sys
+from distutils import core, log
+from distutils.command.sdist import sdist
+from distutils.core import Command
+
import os
import io
import unittest
-from setuptools import setup, Command
__version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
@@ -34,7 +37,7 @@ manpage = [os.path.join(cwd, path) for path in (
)]
-class set_version(Command):
+class set_version(core.Command):
"""Set python version to our __version__."""
description = "hardcode scripts' version using VERSION from environment"
user_options = [] # [(long_name, short_name, desc),]
@@ -66,6 +69,18 @@ class set_version(Command):
sub(manpage, man_re)
+class x_sdist(sdist):
+ """sdist defaulting to archive files owned by root."""
+
+ def finalize_options(self):
+ if self.owner is None:
+ self.owner = 'root'
+ if self.group is None:
+ self.group = 'root'
+
+ sdist.finalize_options(self)
+
+
class TestCommand(Command):
user_options = []
@@ -89,7 +104,7 @@ test_data = {
]
}
-setup(
+core.setup(
name='mirrorselect',
version=__version__,
description='Tool for selecting Gentoo source and rsync mirrors.',
@@ -109,6 +124,7 @@ setup(
),
cmdclass={
'test': TestCommand,
+ 'sdist': x_sdist,
'set_version': set_version,
},
)
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [gentoo-commits] proj/mirrorselect:master commit in: /
@ 2023-08-07 0:14 Sam James
0 siblings, 0 replies; 23+ messages in thread
From: Sam James @ 2023-08-07 0:14 UTC (permalink / raw
To: gentoo-commits
commit: 6643edae74295fb4f3577b34acee667e7eade632
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 7 00:14:06 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 7 00:14:06 2023 +0000
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=6643edae
setup.py: update homepage
Signed-off-by: Sam James <sam <AT> gentoo.org>
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 96f11d1..a8f9313 100755
--- a/setup.py
+++ b/setup.py
@@ -101,12 +101,12 @@ test_data = {"mirrorselect": []}
core.setup(
name="mirrorselect",
version=__version__,
- description="Tool for selecting Gentoo source and rsync mirrors.",
+ description="Tool for selecting Gentoo source and rsync mirrors",
author="",
author_email="",
maintainer="Gentoo Portage Tools Team",
maintainer_email="tools-portage@gentoo.org",
- url="http://www.gentoo.org/proj/en/portage/tools/index.xml",
+ url="https://wiki.gentoo.org/wiki/Project:Portage-Tools",
download_url="http://distfiles.gentoo.org/distfiles/mirrorselect-%s.tar.gz"
% __version__,
packages=["mirrorselect"],
^ permalink raw reply related [flat|nested] 23+ messages in thread
end of thread, other threads:[~2023-08-07 0:14 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-18 14:26 [gentoo-commits] proj/mirrorselect:master commit in: / Brian Dolbec
-- strict thread matches above, loose matches on Subject: below --
2023-08-07 0:14 Sam James
2022-07-10 21:16 Brian Dolbec
2022-05-31 18:56 Brian Dolbec
2022-05-31 4:08 Brian Dolbec
2019-02-13 8:43 Zac Medico
2014-05-29 16:32 Brian Dolbec
2014-05-05 2:04 Brian Dolbec
2014-01-31 15:44 [gentoo-commits] proj/mirrorselect:ssl " Brian Dolbec
2014-03-02 7:44 ` [gentoo-commits] proj/mirrorselect:master " Brian Dolbec
2013-03-10 13:07 Brian Dolbec
2012-12-16 6:02 Brian Dolbec
2012-12-16 4:48 Brian Dolbec
2012-12-15 22:31 Brian Dolbec
2012-12-15 20:26 Brian Dolbec
2012-11-14 18:25 Paul Varner
2012-11-14 18:18 Paul Varner
2012-11-14 18:06 Paul Varner
2012-11-12 21:41 Brian Dolbec
2012-11-12 15:56 Brian Dolbec
2012-11-12 7:46 Brian Dolbec
2012-11-12 0:50 Brian Dolbec
2012-11-11 23:47 Brian Dolbec
2012-11-11 23:47 Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox