Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove distutils dependency #236

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions 5 configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ AC_PATH_PROG([PYTHON3], [python3], [no])
AC_SUBST([PYTHON3_PREFIX], ['${prefix}'])
AC_SUBST([PYTHON3_EXEC_PREFIX], ['${exec_prefix}'])

PYTHON3_DIR=`$PYTHON3 -c "import distutils.sysconfig; \
print(distutils.sysconfig.get_python_lib(0,0,prefix='$PYTHON3_PREFIX'))"`
PYTHON3_EXECDIR=`$PYTHON3 -c "import distutils.sysconfig; \
print(distutils.sysconfig.get_python_lib(1,0,prefix='$PYTHON3_EXEC_PREFIX'))"`


AC_SUBST(PYTHON3_CFLAGS)
AC_SUBST(PYTHON3_LIBS)
Expand Down
11 changes: 10 additions & 1 deletion 11 src/amcrest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@
from typing import List

# pylint: disable=no-name-in-module
from distutils import util
#from distutils import util

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black would make changes.
block comment should start with '# '

from typing import List, Tuple, Union

DATEFMT = "%Y-%m-%d %H:%M:%S"
PRECISION = 2


def strtobool(value: str) -> bool:
"""Convert string to boolean."""
if s.lower() in ['yes', 'true', 't', 'y', '1']:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined name 's'

return True
elif s.lower() in ['no', 'false', 'f', 'n', '0']:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined name 's'

return False
else:
raise ValueError("Cannot convert {} to a bool".format(s))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined name 's'


def clean_url(url: str) -> str:
host = re.sub(r"^http[s]?://", "", url, flags=re.IGNORECASE)
host = re.sub(r"/$", "", host)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.