-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
433 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[report] | ||
fail_under = 100 | ||
exclude_lines = | ||
pragma: no cover | ||
def __repr__ | ||
if self.debug: | ||
if settings.DEBUG | ||
raise AssertionError | ||
raise NotImplementedError | ||
if 0: | ||
if __name__ == .__main__.: | ||
|
||
[run] | ||
source = src | ||
branch = True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
sudo: false | ||
language: python | ||
python: | ||
- '2.6' | ||
- '2.7' | ||
- '3.3' | ||
- '3.4' | ||
- '3.5' | ||
- 'pypy' | ||
- 'pypy3' | ||
|
||
- '2.6' | ||
- '2.7' | ||
- '3.3' | ||
- '3.4' | ||
- '3.5' | ||
- pypy | ||
- pypy3 | ||
before_install: | ||
- wheel version | ||
|
||
# command to install dependencies | ||
- wheel version | ||
install: | ||
- pip install -r test_requirements.txt | ||
- pip install -e . | ||
- pip install coveralls | ||
|
||
# command to run tests | ||
- pip install -r tests/requirements.txt | ||
- pip install -e . | ||
- pip install coveralls | ||
script: | ||
- python setup.py test | ||
|
||
- python setup.py test | ||
after_success: | ||
- coveralls | ||
- python setup.py bdist_wheel | ||
- ls -la dist/ | ||
- coveralls | ||
- python setup.py bdist_wheel | ||
- ls -la dist/ | ||
|
||
before_deploy: | ||
- python setup.py combine -o dist/portalocker_full.py | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: xY/jF18OX/muUeSnncY3GeHpzOlPi9NGfOUM/Cl7LXCjNnqXVub2uxYiOdwGs1Z9GNqftNv4g1+th89jHVyPOvXK3DSQ0yemMMMM3ZLFdeuy/XcQyuS/32tMfFm5jBBG6sa/S8Mm6H9ShQfQcrQT4su7EzHJIAz72iUXMagKtHM= | ||
file: dist/portalocker_full.py | ||
skip_cleanup: true | ||
on: | ||
repo: WoLpH/portalocker | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Changelog | ||
========= | ||
|
||
For a more detailed overview of the changelog please view the Git history | ||
|
||
.. include :: ../CHANGELOG.rst | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
License | ||
======= | ||
|
||
.. literalinclude:: ../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,15 @@ | ||
portalocker package | ||
=================== | ||
Portalocker | ||
=========== | ||
|
||
Submodules | ||
---------- | ||
|
||
portalocker.portalocker module | ||
------------------------------ | ||
|
||
.. automodule:: portalocker.portalocker | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
portalocker.utils module | ||
------------------------ | ||
|
||
.. automodule:: portalocker.utils | ||
.. automodule:: portalocker | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Tests | ||
===== | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: portalocker | ||
.. automodule:: tests.tests | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
__package_name__ = 'portalocker' | ||
__author__ = 'Rick van Hattem' | ||
__email__ = 'wolph@wol.ph' | ||
__version__ = '1.0.0' | ||
__description__ = '''Wraps the portalocker recipe for easy usage''' | ||
__url__ = 'https://github.com/WoLpH/portalocker' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
|
||
# The actual tests will execute the code anyhow so the following code can | ||
# safely be ignored from the coverage tests | ||
if os.name == 'nt': # pragma: no cover | ||
import msvcrt | ||
|
||
LOCK_EX = 0x1 | ||
LOCK_SH = 0x2 | ||
LOCK_NB = 0x4 | ||
LOCK_UN = msvcrt.LK_UNLCK | ||
|
||
elif os.name == 'posix': # pragma: no cover | ||
import fcntl | ||
|
||
LOCK_EX = fcntl.LOCK_EX | ||
LOCK_SH = fcntl.LOCK_SH | ||
LOCK_NB = fcntl.LOCK_NB | ||
LOCK_UN = fcntl.LOCK_UN | ||
|
||
else: # pragma: no cover | ||
raise RuntimeError('PortaLocker only defined for nt and posix platforms') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class BaseLockException(Exception): | ||
# Error codes: | ||
LOCK_FAILED = 1 | ||
|
||
|
||
class LockException(BaseLockException): | ||
pass | ||
|
||
|
||
class AlreadyLocked(BaseLockException): | ||
pass |
Oops, something went wrong.