-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose version as tomcrypt.__version__
- Loading branch information
Showing
7 changed files
with
46 additions
and
11 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# General. | ||
*.pyc | ||
.DS_Store | ||
*.egg-info | ||
|
||
# Old venv. | ||
/.Python | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
|
||
|
||
cdef extern from "pytomcrypt.h" nogil: | ||
pass | ||
const char* PTC_VERSION | ||
|
||
|
||
cdef extern from "stdlib.h" nogil: | ||
|
||
|
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,4 +1,8 @@ | ||
|
||
|
||
version = PTC_VERSION | ||
|
||
|
||
# Setup TomsFastMath for use. | ||
mp = ltm_desc | ||
|
||
|
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,28 @@ | ||
from . import * | ||
|
||
import tomcrypt | ||
|
||
|
||
class TestVersion(TestCase): | ||
|
||
def test_setup_version(self): | ||
|
||
setup_py = os.path.abspath(os.path.join(__file__, '..', '..', 'setup.py')) | ||
proc = Popen(['python', setup_py, '--version'], stdout=PIPE) | ||
out, _ = proc.communicate() | ||
|
||
self.assertEqual(out.strip(), tomcrypt.__version__) | ||
|
||
def test_docs_version(self): | ||
|
||
conf_py = os.path.abspath(os.path.join(__file__, '..', '..', 'docs', 'conf.py')) | ||
namespace = {} | ||
execfile(conf_py, namespace) | ||
|
||
self.assertEqual(namespace['release'], tomcrypt.__version__) | ||
|
||
real = tomcrypt.__version__.split('.') | ||
docs = namespace['version'].split('.') | ||
self.assertEqual(docs, real[:len(docs)]) | ||
|
||
|
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