Skip to content

Commit

Permalink
Fix gcd import (#23)
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
lime-green authored Jan 31, 2021
1 parent a5c2fc0 commit 0277a50
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
]
},
classifiers=[
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Expand All @@ -45,9 +45,11 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
python_requires='>=3.6, <4',
license="MIT",
keywords=["docker", "aws", "development", "macos", "linux"],
)
4 changes: 1 addition & 3 deletions src/remote_docker_aws/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from typing import Dict, List

import boto3
from sceptre.cli.helpers import setup_logging
from sceptre.context import SceptreContext
from sceptre.plan.plan import SceptrePlan
from unison_gitignore.parser import GitIgnoreToUnisonIgnore

from .config import RemoteDockerConfigProfile
Expand All @@ -20,6 +17,7 @@
PORT_MAP_TYPE,
SCEPTRE_PATH,
)
from .sceptre_compat import setup_logging, SceptreContext, SceptrePlan
from .util import get_replica_and_sync_paths_for_unison, logger, wait_until_port_is_open


Expand Down
18 changes: 18 additions & 0 deletions src/remote_docker_aws/sceptre_compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
This is to avoid the fractions.gcd import done in networkx (used by sceptre)
Once this issue is resolved https://github.com/Sceptre/sceptre/issues/942
we can update sceptre and remove this logic
"""
import fractions

try:
fractions.gcd
except AttributeError:
from math import gcd

setattr(fractions, "gcd", gcd)

from sceptre.cli.helpers import setup_logging # noqa
from sceptre.context import SceptreContext # noqa
from sceptre.plan.plan import SceptrePlan # noqa

0 comments on commit 0277a50

Please sign in to comment.