Skip to content

Commit

Permalink
Merge pull request #2623 from fredriksvantes/patch-3
Browse files Browse the repository at this point in the history
pip no longer invoked by an old script wrapper.
  • Loading branch information
djrtwo authored Sep 27, 2021
2 parents d34b79f + 0b808b5 commit 795d147
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,26 @@
from typing import Dict, NamedTuple, List, Sequence, Optional, TypeVar
from abc import ABC, abstractmethod
import ast

import subprocess
import sys

# NOTE: have to programmatically include third-party dependencies in `setup.py`.
def installPackage(package: str):
subprocess.check_call([sys.executable, '-m', 'pip', 'install', package])

RUAMEL_YAML_VERSION = "ruamel.yaml==0.16.5"
try:
import ruamel.yaml
except ImportError:
import pip
pip.main(["install", RUAMEL_YAML_VERSION])
installPackage(RUAMEL_YAML_VERSION)

from ruamel.yaml import YAML

MARKO_VERSION = "marko==1.0.2"
try:
import marko
except ImportError:
import pip
pip.main(["install", MARKO_VERSION])
installPackage(MARKO_VERSION)

from marko.block import Heading, FencedCode, LinkRefDef, BlankLine
from marko.inline import CodeSpan
Expand Down

0 comments on commit 795d147

Please sign in to comment.