Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-13509: Some pure python packages add to LD_LIBRARY_PATH #45

Merged
merged 7 commits into from
May 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
_build.*
.sconsign.dblite
.cache
.pytest_cache
config.log
.sconf_temp
*.o
Expand All @@ -12,6 +13,8 @@ config.log
*Lib.py
.cache
pytest_session.txt
bin/displayCamera.py
bin/megacamCalibRegistry.py
doc/html
doc/*.tag
doc/*.inc
Expand Down
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sudo: false
language: python
matrix:
include:
- python: '3.6'
install:
- pip install flake8
script: flake8
3 changes: 3 additions & 0 deletions bin.src/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- python -*-
from lsst.sconsUtils import scripts
scripts.BasicSConscript.shebang()
6 changes: 3 additions & 3 deletions bin/displayCamera.py → bin.src/displayCamera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from builtins import range
#!/usr/bin/env python
import argparse
import re
Expand Down Expand Up @@ -39,8 +38,9 @@ def checkStr(strVal, level):
parser.add_argument('--showCcd', help='Show a CCD from the mosaic in ds9. May have multiple arguments. '
'Format like ccd_name e.g. \"ccd16\"', type=str,
nargs='+')
parser.add_argument('--showRaft', help='Show a Raft from the mosaic in ds9. May have multiple arguments. '
'Format like raft_name e.g. \"North\"', type=str, nargs='+')
parser.add_argument('--showRaft',
help='Show a Raft from the mosaic in ds9. May have multiple arguments. '
'Format like raft_name e.g. \"North\"', type=str, nargs='+')
parser.add_argument('--showCamera', help='Show the camera mosaic in ds9.', action='store_true')
parser.add_argument('--cameraBinSize', type=int, default=20,
help='Size of binning when displaying the full camera mosaic')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import print_function
from builtins import range
import os
import sqlite3
import argparse
Expand Down
1 change: 0 additions & 1 deletion bin/genCameraRepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

If `megacam/camera` already exists the move it first, or add `--clobber`
"""
from __future__ import print_function
import argparse
import eups
import os
Expand Down
3 changes: 1 addition & 2 deletions bin/genDefectRegistry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down Expand Up @@ -40,7 +39,7 @@
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]

f = file(sys.argv[1])
f = open(sys.argv[1])
root = sys.argv[2]
for line in f:
if line.startswith('#'):
Expand Down
1 change: 0 additions & 1 deletion python/lsst/obs/cfht/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down
1 change: 0 additions & 1 deletion python/lsst/obs/cfht/cfhtIsrTask.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import, division, print_function

__all__ = ["CfhtIsrTaskConfig", "CfhtIsrTask"]

Expand Down
3 changes: 1 addition & 2 deletions python/lsst/obs/cfht/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# the GNU General Public License along with this program. If not,
# see <http://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import absolute_import, division, print_function

__all__ = ["MegacamParseTask"]

Expand Down Expand Up @@ -48,7 +47,7 @@ def translate_ccd(self, md):
try:
extname = self.getExtensionName(md)
return int(extname[3:]) # chop off "ccd"
except:
except LookupError:
# Dummy value, intended for PHU (need something to get filename)
return 99

Expand Down
3 changes: 0 additions & 3 deletions python/lsst/obs/cfht/makeMegacamRawVisitInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
# the GNU General Public License along with this program. If not,
# see <http://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import astropy.units

Expand Down
1 change: 0 additions & 1 deletion python/lsst/obs/cfht/megacamMapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from builtins import map
#
# LSST Data Management System
# Copyright 2012 LSST Corporation.
Expand Down
18 changes: 18 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[flake8]
max-line-length = 110
ignore = E133, E226, E228, E266, N802, N803, N806
# TODO: remove E266 when Task documentation is converted to rst in DM-14207.
exclude =
__init__.py,
config/*,
megacam/camera/camera.py

[tool:pytest]
addopts = --flake8
flake8-ignore = E133 E226 E228 N802 N803 N806
__init__.py
config/*
megacam/camera/camera.py
# TODO: remove E266 lines when Task documentation is converted to rst in DM-14207.
transformMeasurement.py E266

2 changes: 1 addition & 1 deletion tests/SConscript
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- python -*-
from lsst.sconsUtils import scripts
scripts.BasicSConscript.tests()
scripts.BasicSConscript.tests(pyList=[])
2 changes: 0 additions & 2 deletions tests/test_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
# see <http://www.lsstcorp.org/LegalNotices/>.
#

from __future__ import absolute_import, division, print_function
from builtins import range
import math
import os
import sys
Expand Down
1 change: 0 additions & 1 deletion tests/test_colorterms.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# the GNU General Public License along with this program. If not,
# see <http://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import absolute_import, division, print_function
import os
import numbers
import unittest
Expand Down
1 change: 0 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# the GNU General Public License along with this program. If not,
# see <http://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import absolute_import, division, print_function

import os
import unittest
Expand Down
3 changes: 1 addition & 2 deletions ups/obs_cfht.table
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ setupRequired(meas_algorithms)
setupRequired(pipe_tasks)

setupOptional(testdata_cfht)
envPrepend(LD_LIBRARY_PATH, ${PRODUCT_DIR}/lib)
envPrepend(DYLD_LIBRARY_PATH, ${PRODUCT_DIR}/lib)

envPrepend(PYTHONPATH, ${PRODUCT_DIR}/python)
envPrepend(PATH, ${PRODUCT_DIR}/bin)