Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
aflab
astrogeology
Plio
Commits
76a15c44
Commit
76a15c44
authored
8 years ago
by
Jason R Laura
Browse files
Options
Downloads
Patches
Plain Diff
Added a setup.py
parent
7dc976c3
No related branches found
No related tags found
Loading
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-1
1 addition, 1 deletion
.gitignore
.travis.yml
+7
-1
7 additions, 1 deletion
.travis.yml
build.py
+50
-0
50 additions, 0 deletions
build.py
setup.cfg
+0
-0
0 additions, 0 deletions
setup.cfg
setup.py
+31
-0
31 additions, 0 deletions
setup.py
with
89 additions
and
2 deletions
.gitignore
+
1
−
1
View file @
76a15c44
...
@@ -71,4 +71,4 @@ target/
...
@@ -71,4 +71,4 @@ target/
#Data and output files
#Data and output files
.csv
.csv
.png
.png
.SAV
.SAV
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.travis.yml
+
7
−
1
View file @
76a15c44
...
@@ -5,6 +5,10 @@ branches:
...
@@ -5,6 +5,10 @@ branches:
only
:
only
:
-
master
-
master
os
:
-
linux
-
osx
python
:
python
:
-
"
3.5"
-
"
3.5"
...
@@ -35,6 +39,8 @@ install:
...
@@ -35,6 +39,8 @@ install:
script
:
script
:
-
nosetests --with-coverage --cover-package=plio
-
nosetests --with-coverage --cover-package=plio
# After test success, package and upload to Anaconda
-
python build.py --project plio
after_success
:
after_success
:
-
coveralls
-
coveralls
...
@@ -48,4 +54,4 @@ notifications:
...
@@ -48,4 +54,4 @@ notifications:
recipients
:
recipients
:
-
jlaura@usgs.gov
-
jlaura@usgs.gov
on_success
:
always
on_success
:
always
on_failure
:
always
on_failure
:
always
\ No newline at end of file
This diff is collapsed.
Click to expand it.
build.py
0 → 100644
+
50
−
0
View file @
76a15c44
#!/usr/bin/env python
import
sys
import
os
import
sh
from
argparse
import
ArgumentParser
# Initialize
try
:
token
=
os
.
environ
[
'
BINSTAR_KEYN
'
]
except
KeyError
:
sys
.
exit
(
"
Must set $BINSTAR_KEY
"
)
binstar
=
sh
.
Command
(
'
binstar
'
).
bake
(
t
=
token
)
conda
=
sh
.
Command
(
'
conda
'
)
def
build_and_publish
(
path
,
channel
):
binfile
=
conda
.
build
(
"
--output
"
,
path
).
strip
()
print
"
Building...
"
conda
.
build
(
path
)
print
"
Upload to Anaconda.org...
"
binstar
.
upload
(
binfile
,
force
=
True
,
channel
=
channel
)
def
conda_paths
(
project_name
):
conda_recipes_dir
=
os
.
path
.
join
(
project_name
,
'
conda
'
)
if
not
os
.
path
.
isdir
(
conda_recipes_dir
):
sys
.
exit
(
'
no such dir: {}
'
.
format
(
conda_recipes_dir
))
for
name
in
sorted
(
os
.
listdir
(
conda_recipes_dir
)):
yield
os
.
path
.
join
(
conda_recipes_dir
,
name
)
def
main
():
parser
=
ArgumentParser
()
parser
.
add_argument
(
'
-p
'
,
'
--project
'
,
required
=
True
)
parser
.
add_argument
(
'
-c
'
,
'
--channel
'
,
required
=
False
,
default
=
'
main
'
)
parser
.
add_argument
(
'
-s
'
,
'
--site
'
,
required
=
False
,
default
=
None
)
args
=
parser
.
parse_args
()
for
conda_path
in
conda_paths
(
args
.
project
):
build_and_publish
(
conda_path
,
channel
=
args
.
channel
)
return
0
if
__name__
==
'
__main__
'
:
sys
.
exit
(
main
())
This diff is collapsed.
Click to expand it.
setup.cfg
0 → 100644
+
0
−
0
View file @
76a15c44
This diff is collapsed.
Click to expand it.
setup.py
0 → 100644
+
31
−
0
View file @
76a15c44
from
setuptools
import
setup
setup
(
name
=
"
plio
"
,
version
=
"
0.1.0
"
,
author
=
"
Jay Laura
"
,
author_email
=
"
jlaura@usgs.gov
"
,
description
=
(
"
I/O API to support planetary data formats.
"
),
license
=
"
Public Domain
"
,
keywords
=
"
planetary io
"
,
url
=
"
http://packages.python.org/plio
"
,
packages
=
[
'
plio
'
],
install_requires
=
[
'
gdal>=2
'
,
'
pvl
'
,
'
protobuf=3.0.0b2
'
,
'
h5py
'
,
'
pandas
'
,
'
sqlalchemy
'
,
'
pyyaml
'
],
classifiers
=
[
"
Development Status :: 3 - Alpha
"
,
"
Topic :: Utilities
"
,
"
License :: Public Domain
"
,
'
Programming Language :: Python :: 2.7
'
,
'
Programming Language :: Python :: 3
'
,
'
Programming Language :: Python :: 3.3
'
,
'
Programming Language :: Python :: 3.4
'
,
'
Programming Language :: Python :: 3.5
'
,
],
)
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