diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/lockfile | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/lockfile')
-rw-r--r-- | dev-python/lockfile/Manifest | 2 | ||||
-rw-r--r-- | dev-python/lockfile/files/py3-support.patch | 107 | ||||
-rw-r--r-- | dev-python/lockfile/lockfile-0.10.2.ebuild | 41 | ||||
-rw-r--r-- | dev-python/lockfile/lockfile-0.9.1-r1.ebuild | 43 | ||||
-rw-r--r-- | dev-python/lockfile/metadata.xml | 8 |
5 files changed, 201 insertions, 0 deletions
diff --git a/dev-python/lockfile/Manifest b/dev-python/lockfile/Manifest new file mode 100644 index 000000000000..e1bb4de6d544 --- /dev/null +++ b/dev-python/lockfile/Manifest @@ -0,0 +1,2 @@ +DIST lockfile-0.10.2.tar.gz 20662 SHA256 9e42252f17d1dd89ee31745e0c4fbe58862c25147eb0ef5295c9cd9bcb4ea2c1 SHA512 7d70bcf7c343228f144687dd2cbc47a525034a68134fa626077d08308e6abce80559e36e9f65859d4c46873c712f62e1d6bb2aeec422d337332b65caf2e430a8 WHIRLPOOL d23a0b99da2304d9c884e69df7fbae4e507d7bab35fe450f2062aba44b4c85fd2c1585012cd02a56c886b50c44fb5a470afe13546f828297c498c3a8551eda86 +DIST lockfile-0.9.1.tar.gz 16949 SHA256 88d8ea8d435ee5691117a87d1ca8fed2f8da881eb145295bf6895ac2c416e95d SHA512 1f7e2b13c42df730339e653a361bf4b85a289d62ed9277f159ab454b1e951d922884086299912472236ce0772d5eceebab7e0c6407590bb2ccbe9c56b664de05 WHIRLPOOL 543bc9ad7e937feba52c6132eee3356a9a229c8866f4f605f8399343a676fc98f62bf33f121c4f8dcbac8e18f38168561d34119efea5e30b53427a7e7283055d diff --git a/dev-python/lockfile/files/py3-support.patch b/dev-python/lockfile/files/py3-support.patch new file mode 100644 index 000000000000..ca6349a75a20 --- /dev/null +++ b/dev-python/lockfile/files/py3-support.patch @@ -0,0 +1,107 @@ +# https://github.com/smontanaro/pylockfile/commit/379fa0b6131995f96f5bd048906fc0bd3c2527f7 +# https://github.com/smontanaro/pylockfile/commit/eeead7d35e9a97b457b90edd241fd031df68d57b +# https://github.com/smontanaro/pylockfile/commit/bf2627a5b9f83e1bbcf1b5030a693acb6236a211 +--- a/lockfile/__init__.py ++++ b/lockfile/__init__.py +@@ -1,4 +1,3 @@ +- + """ + lockfile.py - Platform-independent advisory file locks. + +@@ -50,6 +49,8 @@ Exceptions: + NotMyLock - File was locked but not by the current thread/process + """ + ++from __future__ import absolute_import ++ + import sys + import socket + import os +@@ -257,7 +258,7 @@ def LinkFileLock(*args, **kwds): + Do not use in new code. Instead, import LinkLockFile from the + lockfile.linklockfile module. + """ +- import linklockfile ++ from . import linklockfile + return _fl_helper(linklockfile.LinkLockFile, "lockfile.linklockfile", + *args, **kwds) + +@@ -267,7 +268,7 @@ def MkdirFileLock(*args, **kwds): + Do not use in new code. Instead, import MkdirLockFile from the + lockfile.mkdirlockfile module. + """ +- import mkdirlockfile ++ from . import mkdirlockfile + return _fl_helper(mkdirlockfile.MkdirLockFile, "lockfile.mkdirlockfile", + *args, **kwds) + +@@ -277,7 +278,7 @@ def SQLiteFileLock(*args, **kwds): + Do not use in new code. Instead, import SQLiteLockFile from the + lockfile.mkdirlockfile module. + """ +- import sqlitelockfile ++ from . import sqlitelockfile + return _fl_helper(sqlitelockfile.SQLiteLockFile, "lockfile.sqlitelockfile", + *args, **kwds) + +@@ -306,10 +307,10 @@ def locked(path, timeout=None): + return decor + + if hasattr(os, "link"): +- import linklockfile as _llf ++ from . import linklockfile as _llf + LockFile = _llf.LinkLockFile + else: +- import mkdirlockfile as _mlf ++ from . import mkdirlockfile as _mlf + LockFile = _mlf.MkdirLockFile + + FileLock = LockFile +diff --git a/lockfile/pidlockfile.py b/lockfile/pidlockfile.py +index 3fc8f63..a965ba8 100644 +--- a/lockfile/pidlockfile.py ++++ b/lockfile/pidlockfile.py +@@ -78,7 +78,7 @@ class PIDLockFile(LockBase): + while True: + try: + write_pid_to_pidfile(self.path) +- except OSError, exc: ++ except OSError as exc: + if exc.errno == errno.EEXIST: + # The lock creation failed. Maybe sleep a bit. + if timeout is not None and time.time() > end_time: +@@ -159,7 +159,7 @@ def write_pid_to_pidfile(pidfile_path): + + """ + open_flags = (os.O_CREAT | os.O_EXCL | os.O_WRONLY) +- open_mode = 0644 ++ open_mode = 0o644 + pidfile_fd = os.open(pidfile_path, open_flags, open_mode) + pidfile = os.fdopen(pidfile_fd, 'w') + +@@ -186,7 +186,7 @@ def remove_existing_pidfile(pidfile_path): + """ + try: + os.remove(pidfile_path) +- except OSError, exc: ++ except OSError as exc: + if exc.errno == errno.ENOENT: + pass + else: +diff --git a/lockfile/sqlitelockfile.py b/lockfile/sqlitelockfile.py +index ec75490..d596229 100644 +--- a/lockfile/sqlitelockfile.py ++++ b/lockfile/sqlitelockfile.py +@@ -3,6 +3,11 @@ from __future__ import absolute_import, division + import time + import os + ++try: ++ unicode ++except NameError: ++ unicode = str ++ + from . import LockBase, NotLocked, NotMyLock, LockTimeout, AlreadyLocked + + class SQLiteLockFile(LockBase): + diff --git a/dev-python/lockfile/lockfile-0.10.2.ebuild b/dev-python/lockfile/lockfile-0.10.2.ebuild new file mode 100644 index 000000000000..5e13652981d9 --- /dev/null +++ b/dev-python/lockfile/lockfile-0.10.2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) + +inherit distutils-r1 + +DESCRIPTION="Platform-independent file locking module" +HOMEPAGE="http://launchpad.net/pylockfile http://pypi.python.org/pypi/lockfile" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="doc test" + +DEPEND="dev-python/pbr[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( dev-python/nose[${PYTHON_USEDEP}] )" +RDEPEND="" + +DOCS=( ACKS README RELEASE-NOTES ) + +python_compile_all() { + if use doc; then + einfo "Generation of documentation" + emake -C doc/source html || die "Generation of documentation failed" + fi +} + +python_test() { + # "${PYTHON}" test/test_lockfile.py yeilds no informative coverage output + nosetests || die "test_lockfile failed under ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/source/.build/html/. ) + distutils-r1_python_install_all +} diff --git a/dev-python/lockfile/lockfile-0.9.1-r1.ebuild b/dev-python/lockfile/lockfile-0.9.1-r1.ebuild new file mode 100644 index 000000000000..d5270533c457 --- /dev/null +++ b/dev-python/lockfile/lockfile-0.9.1-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +# py2.5 dropped; Test file reveals py2.5 can't support a core file +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) + +inherit distutils-r1 + +DESCRIPTION="Platform-independent file locking module" +HOMEPAGE="http://code.google.com/p/pylockfile/ http://pypi.python.org/pypi/lockfile http://smontanaro.dyndns.org/python/" +SRC_URI="http://pylockfile.googlecode.com/files/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 arm ppc ~sparc x86" +IUSE="doc test" + +DEPEND="doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( dev-python/nose[${PYTHON_USEDEP}] )" +RDEPEND="" + +DOCS=( ACKS README RELEASE-NOTES ) + +PATCHES=( "${FILESDIR}"/py3-support.patch ) + +python_compile_all() { + if use doc; then + einfo "Generation of documentation" + emake -C doc html || die "Generation of documentation failed" + fi +} + +python_test() { + # "${PYTHON}" test/test_lockfile.py yeilds no informative coverage output + nosetests || die "test_lockfile failed under ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/.build/html/. ) + distutils-r1_python_install_all +} diff --git a/dev-python/lockfile/metadata.xml b/dev-python/lockfile/metadata.xml new file mode 100644 index 000000000000..45e559da998a --- /dev/null +++ b/dev-python/lockfile/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <upstream> + <remote-id type="pypi">lockfile</remote-id> + </upstream> +</pkgmetadata> |