Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tinyarray
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jörg Behrmann
tinyarray
Commits
4ee86e4e
Commit
4ee86e4e
authored
8 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
setup.py: get rid of most GLOBAL_CONSTANTS
parent
bc43767f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+28
-30
28 additions, 30 deletions
setup.py
with
28 additions
and
30 deletions
setup.py
+
28
−
30
View file @
4ee86e4e
#!/usr/bin/env python
# Copyright 2012-201
5
Tinyarray authors.
# Copyright 2012-201
6
Tinyarray authors.
#
# This file is part of Tinyarray. It is subject to the license terms in the
# file LICENSE.rst found in the top-level directory of this distribution and
...
...
@@ -32,24 +32,8 @@ except ImportError:
return
_getfinalpathname
(
f1
)
==
_getfinalpathname
(
f2
)
README_FILE
=
'
README.rst
'
SAVED_VERSION_FILE
=
'
version
'
VERSION_HEADER
=
[
'
src
'
,
'
version.hh
'
]
CLASSIFIERS
=
"""
\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Programming Language :: C++
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
Operating System :: Microsoft :: Windows
"""
distr_root
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
...
...
@@ -126,7 +110,7 @@ def long_description():
text
=
[]
skip
=
True
try
:
with
open
(
README
_FILE
)
as
f
:
with
open
(
'
README
.rst
'
)
as
f
:
for
line
in
f
:
if
line
==
"
\n
"
:
if
skip
:
...
...
@@ -145,7 +129,7 @@ def long_description():
class
our_build_ext
(
build_ext
):
def
run
(
self
):
with
open
(
os
.
path
.
join
(
*
VERSION_HEADER
),
'
w
'
)
as
f
:
with
open
(
os
.
path
.
join
(
'
src
'
,
'
version.hh
'
),
'
w
'
)
as
f
:
f
.
write
(
"
// This file has been generated by setup.py.
\n
"
)
f
.
write
(
"
// It is not included in source distributions.
\n
"
)
f
.
write
(
'
#define VERSION
"
{}
"
\n
'
.
format
(
version
))
...
...
@@ -168,15 +152,29 @@ class our_sdist(sdist):
.
format
(
version
))
module
=
Extension
(
'
tinyarray
'
,
language
=
'
c++
'
,
sources
=
[
'
src/arithmetic.cc
'
,
'
src/array.cc
'
,
'
src/functions.cc
'
],
depends
=
[
'
src/arithmetic.hh
'
,
'
src/array.hh
'
,
'
src/conversion.hh
'
,
'
src/functions.hh
'
])
def
main
():
exts
=
[
Extension
(
'
tinyarray
'
,
language
=
'
c++
'
,
sources
=
[
'
src/arithmetic.cc
'
,
'
src/array.cc
'
,
'
src/functions.cc
'
],
depends
=
[
'
src/arithmetic.hh
'
,
'
src/array.hh
'
,
'
src/conversion.hh
'
,
'
src/functions.hh
'
])]
classifiers
=
"""
\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Programming Language :: C++
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: POSIX
Operating System :: Unix
Operating System :: MacOS
Operating System :: Microsoft :: Windows
"""
setup
(
name
=
'
tinyarray
'
,
version
=
version
,
author
=
'
Christoph Groth (CEA) and others
'
,
...
...
@@ -187,10 +185,10 @@ def main():
download_url
=
"
http://downloads.kwant-project.org/tinyarray/
"
,
license
=
"
Simplified BSD license
"
,
platforms
=
[
"
Unix
"
,
"
Linux
"
,
"
Mac OS-X
"
,
"
Windows
"
],
classifiers
=
CLASSIFIERS
.
split
(
'
\n
'
),
classifiers
=
classifiers
.
split
(
'
\n
'
),
cmdclass
=
{
'
build_ext
'
:
our_build_ext
,
'
sdist
'
:
our_sdist
},
ext_modules
=
[
module
]
,
ext_modules
=
exts
,
test_suite
=
'
nose.collector
'
,
tests_require
=
[
'
nose >= 1.0
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment