Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tinyarray
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kwant
tinyarray
Commits
c1a51162
Commit
c1a51162
authored
Aug 13, 2013
by
Christoph Groth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add setup.py test, use it when building debian package
parent
632dc6dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
5 deletions
+53
-5
README
README
+7
-2
debian/control
debian/control
+1
-0
debian/rules
debian/rules
+14
-2
setup.py
setup.py
+31
-1
No files found.
README
View file @
c1a51162
...
...
@@ -47,8 +47,13 @@ Tinyarray requires Python 2.6 or 2.7.
To install, run::
python setup.py build
python setup.py install
python setup.py build
python setup.py install
If `nose <http://nose.readthedocs.org/>`_ is installed, the included tests can
be run with::
python setup.py test
Usage
...
...
debian/control
View file @
c1a51162
...
...
@@ -6,6 +6,7 @@ Build-Depends: python-all-dev (>= 2.6.6-3), debhelper (>= 7)
Standards-Version: 3.9.1
Vcs-Git: http://git.kwant-project.org/tinyarray/
Homepage: http://kwant-project.org/tinyarray/
X-Python-Version: >= 2.6
Package: python-tinyarray
Architecture: any
...
...
debian/rules
View file @
c1a51162
#!/usr/bin/make -f
# This file was automatically generated by stdeb 0.6.0+git at
# Thu, 01 Aug 2013 14:53:39 +0200
# See https://wiki.debian.org/Python/LibraryStyleGuide
PYTHON2=$(shell pyversions -vr)
%:
dh $@ --with python2 --buildsystem=python_distutils
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test-python%:
python$* setup.py test
override_dh_auto_test: $(PYTHON2:%=test-python%)
endif
override_dh_auto_clean:
dh_auto_clean
rm -rf build
setup.py
View file @
c1a51162
...
...
@@ -10,10 +10,14 @@
import
subprocess
import
os
from
distutils.core
import
setup
,
Extension
import
sys
from
distutils.core
import
setup
,
Extension
,
Command
from
distutils.util
import
get_platform
from
distutils.errors
import
DistutilsError
,
DistutilsModuleError
README_FILE
=
'README'
STATIC_VERSION_FILE
=
'src/version.hh'
TEST_MODULE
=
'test_tinyarray.py'
tinyarray_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
...
...
@@ -89,6 +93,31 @@ def long_description():
return
'
\n
'
.
join
(
text
)
class
test
(
Command
):
description
=
"run the unit tests"
user_options
=
[]
def
initialize_options
(
self
):
pass
def
finalize_options
(
self
):
pass
def
run
(
self
):
try
:
from
nose.core
import
run
except
ImportError
:
raise
DistutilsModuleError
(
'nose <http://nose.readthedocs.org/> '
'is needed to run the tests'
)
self
.
run_command
(
'build'
)
major
,
minor
=
sys
.
version_info
[:
2
]
lib_dir
=
"build/lib.{0}-{1}.{2}"
.
format
(
get_platform
(),
major
,
minor
)
print
'**************** Tests ****************'
if
not
run
(
argv
=
[
__file__
,
'-v'
,
'-w'
,
lib_dir
,
'-w'
,
'../../'
+
TEST_MODULE
]):
raise
DistutilsError
(
'at least one of the tests failed'
)
module
=
Extension
(
'tinyarray'
,
language
=
'c++'
,
sources
=
[
'src/arithmetic.cc'
,
'src/array.cc'
,
...
...
@@ -107,6 +136,7 @@ def main():
url
=
"http://kwant-project.org/tinyarray/"
,
license
=
"BSD"
,
platforms
=
[
"Unix"
,
"Linux"
,
"Mac OS-X"
,
"Windows"
],
cmdclass
=
{
'test'
:
test
},
ext_modules
=
[
module
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment