Skip to content

Commit

Permalink
Depend on newer style Galaxy library dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed May 29, 2019
1 parent 239b220 commit 2841259
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 28 deletions.
5 changes: 4 additions & 1 deletion pulsar/managers/queued_external_drmaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
from .util.sudo import sudo_popen
from ..managers import status

from galaxy.tools.deps.commands import which
try:
from galaxy.tools.deps.commands import which
except ImportError:
from galaxy.tool_util.deps.commands import which

from logging import getLogger
log = getLogger(__name__)
Expand Down
8 changes: 5 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ psutil
PasteDeploy
six
pyyaml
galaxy-lib
galaxy-job-metrics>=19.9.0.dev0
galaxy-objectstore>=19.9.0.dev0
galaxy-tool-util>=19.9.0.dev0
paramiko

# Problematic for Python 3.
paste
PasteScript
paste ; python_version == '2.7'
PasteScript ; python_version == '2.7'

## Uncomment if using DRMAA queue manager.
#drmaa
Expand Down
10 changes: 0 additions & 10 deletions requirements3.txt

This file was deleted.

20 changes: 12 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

requirements = [
'six',
'webob',
'psutil',
'pyyaml',
]
if os.path.exists("requirements.txt"):
requirements = [r for r in open("requirements.txt").read().split("\n") if ";" not in r]
py27_requirements = [r.split(";", 1)[0].strip() for r in open("requirements.txt").read().split("\n") if ";" in r]
else:
# In tox, it will cover them anyway.
requirements = []
py27_requirements = []

if not PULSAR_GALAXY_LIB:
requirements.append("galaxy-lib")
if PULSAR_GALAXY_LIB:
requirements = [r for r in requirements if not r.startswith("galaxy-")]

# TODO: use extra_requires here to be more correct.
if sys.version_info[0] == 2:
Expand Down Expand Up @@ -108,6 +109,9 @@
package_dir={'pulsar': 'pulsar'},
include_package_data=True,
install_requires=requirements,
extras_require={
':python_version=="2.7"': py27_requirements,
},
license="Apache License 2.0",
zip_safe=False,
keywords='pulsar',
Expand Down
4 changes: 2 additions & 2 deletions test/client_staging_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from pulsar.client.test.test_common import write_config
from pulsar.client import submit_job, ClientJobDescription
from pulsar.client import ClientOutputs
from galaxy.tools.deps.dependencies import DependenciesDescription
from galaxy.tools.deps.requirements import ToolRequirement
from galaxy.tool_util.deps.dependencies import DependenciesDescription
from galaxy.tool_util.deps.requirements import ToolRequirement

TEST_REQUIREMENT_1 = ToolRequirement("test1", "1.0")
TEST_REQUIREMENT_2 = ToolRequirement("test2", "1.0")
Expand Down
2 changes: 1 addition & 1 deletion test/persistence_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
temp_directory,
TestDependencyManager
)
from galaxy.job_metrics import NULL_JOB_INSTRUMENTER
from galaxy.util.bunch import Bunch
from galaxy.jobs.metrics import NULL_JOB_INSTRUMENTER

TEST_JOB_ID = "4"
TEST_STAGED_FILE = "cow"
Expand Down
2 changes: 1 addition & 1 deletion test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

import galaxy.util
import pulsar.util
from galaxy.job_metrics import NULL_JOB_INSTRUMENTER
from galaxy.util.bunch import Bunch
from galaxy.jobs.metrics import NULL_JOB_INSTRUMENTER

from pulsar.managers.util import drmaa
from pulsar.tools import ToolBox
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ commands = nosetests --exclude '.*integration.*' []

[testenv:py35]
deps =
-rrequirements3.txt
-rrequirements.txt
-rdev-requirements.txt
drmaa

[testenv:py35-unit]
commands = nosetests --verbose --exclude '.*integration.*' []
deps =
-rrequirements3.txt
-rrequirements.txt
-rdev-requirements.txt
drmaa

Expand Down

0 comments on commit 2841259

Please sign in to comment.