Skip to content

Commit

Permalink
Test compatibility with Python 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
17451k committed Mar 1, 2019
1 parent 78aed60 commit 2586f62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: python

dist: xenial
sudo: true

python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"
Expand Down
7 changes: 6 additions & 1 deletion clade/extensions/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
from clade.extensions.utils import common_main


# multiprocessing form Python 3.4 can't pickle Info._normalize_file directly
def unwrap(self, file):
self._normalize_file(file)


class Info(Extension):
always_requires = ["SrcGraph", "Path", "Storage"]
requires = always_requires + ["CC", "CL"]
Expand Down Expand Up @@ -285,7 +290,7 @@ def __normalize_cif_output(self, cmds_file):
max_workers=os.cpu_count()
) as p:
for file in [f for f in self.files if f != self.init_global]:
p.submit(Info._normalize_file, self, file)
p.submit(unwrap, self, file)

self.log("Normalizing finished")

Expand Down

0 comments on commit 2586f62

Please sign in to comment.