Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
ligo-segments
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
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
lscsoft
ligo-segments
Commits
33567a28
Commit
33567a28
authored
Oct 11, 2018
by
Kipp Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup.py: aesthetics
- convert indenting style to that of this package, compress
parent
b8e57142
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
64 deletions
+52
-64
setup.py
setup.py
+52
-64
No files found.
setup.py
View file @
33567a28
...
...
@@ -14,85 +14,73 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""setup for segments
"""
import
os.path
import
re
from
setuptools
import
setup
,
Extension
import
sys
from
setuptools
import
(
setup
,
find_packages
,
Extension
)
cmdclass
=
{}
# get version
def
find_version
(
path
):
with
open
(
path
,
'r'
)
as
fp
:
version_file
=
fp
.
read
()
version_match
=
re
.
search
(
r
"^__version__ = ['\"]([^'\"]*)['\"]"
,
version_file
,
re
.
M
)
if
version_match
:
return
version_match
.
group
(
1
)
raise
RuntimeError
(
"Unable to find version string."
)
# collect package data
packages
=
find_packages
()
version_match
=
re
.
search
(
r
"^__version__ = ['\"]([^'\"]*)['\"]"
,
open
(
path
).
read
(),
re
.
M
)
if
not
version_match
:
raise
RuntimeError
(
"'%s': unable to find __version__ string"
%
path
)
return
version_match
.
group
(
1
)
# declare dependencies
setup_requires
=
[
'setuptools'
]
install_requires
=
[
'six'
,
'ligo-common'
]
cmdclass
=
{}
# add test dependencies
if
{
'pytest'
,
'test'
,
'prt'
}.
intersection
(
sys
.
argv
):
setup_requires
.
append
(
'pytest_runner'
)
setup_requires
.
append
(
'pytest_runner'
)
# add documentation dependencies
if
{
'build_sphinx'
}.
intersection
(
sys
.
argv
):
setup_requires
.
extend
([
'sphinx'
,
'sphinx_rtd_theme'
,
])
from
sphinx.setup_command
import
BuildDoc
cmdclass
[
'build_sphinx'
]
=
BuildDoc
setup_requires
.
extend
([
'sphinx'
,
'sphinx_rtd_theme'
,
])
from
sphinx.setup_command
import
BuildDoc
cmdclass
[
'build_sphinx'
]
=
BuildDoc
# define extension
csegments
=
Extension
(
'ligo.__segments'
,
[
'src/segments.c'
,
'src/infinity.c'
,
'src/segment.c'
,
'src/segmentlist.c'
],
include_dirs
=
[
'src'
],
)
# run setup
setup
(
name
=
'ligo-segments'
,
version
=
find_version
(
os
.
path
.
join
(
'ligo'
,
'segments.py'
)),
description
=
'Representations of semi-open intervals'
,
author
=
'Kipp Cannon'
,
author_email
=
'kipp.cannon@ligo.org'
,
license
=
'GPLv3'
,
packages
=
packages
,
namespace_packages
=
[
'ligo'
],
cmdclass
=
cmdclass
,
setup_requires
=
setup_requires
,
install_requires
=
install_requires
,
ext_modules
=
[
csegments
],
classifiers
=
[
'Development Status :: 5 - Production/Stable'
,
'Programming Language :: Python'
,
'Programming Language :: Python :: 2.7'
,
'Programming Language :: Python :: 3.4'
,
'Programming Language :: Python :: 3.5'
,
'Programming Language :: Python :: 3.6'
,
'Intended Audience :: Science/Research'
,
'Intended Audience :: End Users/Desktop'
,
'Intended Audience :: Developers'
,
'Natural Language :: English'
,
'Topic :: Scientific/Engineering'
,
'Topic :: Scientific/Engineering :: Astronomy'
,
'Topic :: Scientific/Engineering :: Physics'
,
'Operating System :: POSIX'
,
'Operating System :: Unix'
,
'Operating System :: MacOS'
,
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)'
,
],
)
setup
(
name
=
'ligo-segments'
,
version
=
find_version
(
os
.
path
.
join
(
'ligo'
,
'segments.py'
)),
description
=
'Representations of semi-open intervals'
,
author
=
'Kipp Cannon'
,
author_email
=
'kipp.cannon@ligo.org'
,
license
=
'GPLv3'
,
packages
=
[
'ligo'
],
namespace_packages
=
[
'ligo'
],
cmdclass
=
cmdclass
,
setup_requires
=
setup_requires
,
install_requires
=
[
'six'
,
'ligo-common'
],
ext_modules
=
[
Extension
(
'ligo.__segments'
,
[
'src/segments.c'
,
'src/infinity.c'
,
'src/segment.c'
,
'src/segmentlist.c'
],
include_dirs
=
[
'src'
],
),
],
classifiers
=
[
'Development Status :: 5 - Production/Stable'
,
'Programming Language :: Python'
,
'Programming Language :: Python :: 2.7'
,
'Programming Language :: Python :: 3.4'
,
'Programming Language :: Python :: 3.5'
,
'Programming Language :: Python :: 3.6'
,
'Intended Audience :: Science/Research'
,
'Intended Audience :: End Users/Desktop'
,
'Intended Audience :: Developers'
,
'Natural Language :: English'
,
'Topic :: Scientific/Engineering'
,
'Topic :: Scientific/Engineering :: Astronomy'
,
'Topic :: Scientific/Engineering :: Physics'
,
'Operating System :: POSIX'
,
'Operating System :: Unix'
,
'Operating System :: MacOS'
,
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)'
,
],
)
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