Fix package installation script
This commit is contained in:
@@ -32,14 +32,14 @@ import platform
|
||||
import re
|
||||
import six
|
||||
import sys
|
||||
from praw import decorators, errors
|
||||
from praw.handlers import DefaultHandler
|
||||
from praw.helpers import chunk_sequence, normalize_url
|
||||
from praw.internal import (_image_type, _prepare_request,
|
||||
from . import decorators, errors
|
||||
from .handlers import DefaultHandler
|
||||
from .helpers import chunk_sequence, normalize_url
|
||||
from .internal import (_image_type, _prepare_request,
|
||||
_raise_redirect_exceptions,
|
||||
_raise_response_exceptions,
|
||||
_to_reddit_list, _warn_pyopenssl)
|
||||
from praw.settings import CONFIG
|
||||
from .settings import CONFIG
|
||||
from requests import Session
|
||||
from requests.compat import urljoin
|
||||
from requests.utils import to_native_string
|
||||
@@ -2791,4 +2791,4 @@ class Reddit(ModConfigMixin, ModFlairMixin, ModLogMixin, ModOnlyMixin,
|
||||
"""
|
||||
|
||||
# Prevent recursive import
|
||||
from praw import objects # NOQA
|
||||
from . import objects # NOQA
|
||||
|
||||
@@ -27,12 +27,12 @@ import decorator
|
||||
import six
|
||||
import sys
|
||||
from functools import wraps
|
||||
from praw.decorator_helpers import (
|
||||
from .decorator_helpers import (
|
||||
_get_captcha,
|
||||
_is_mod_of_all,
|
||||
_make_func_args
|
||||
)
|
||||
from praw import errors
|
||||
from . import errors
|
||||
from warnings import filterwarnings, warn
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ def restrict_access(scope, mod=None, login=None, oauth_only=False,
|
||||
# Defer access until necessary for RedditContentObject.
|
||||
# This is because scoped sessions may not require this
|
||||
# attribute to exist, thus it might not be set.
|
||||
from praw.objects import Subreddit
|
||||
from .objects import Subreddit
|
||||
subreddit = args[0] if isinstance(args[0], Subreddit) \
|
||||
else False
|
||||
else:
|
||||
|
||||
@@ -6,8 +6,8 @@ import socket
|
||||
import sys
|
||||
import time
|
||||
from functools import wraps
|
||||
from praw.errors import ClientException
|
||||
from praw.helpers import normalize_url
|
||||
from .errors import ClientException
|
||||
from .helpers import normalize_url
|
||||
from requests import Session
|
||||
from six import text_type
|
||||
from six.moves import cPickle # pylint: disable=F0401
|
||||
|
||||
@@ -27,7 +27,7 @@ import time
|
||||
from collections import deque
|
||||
from functools import partial
|
||||
from timeit import default_timer as timer
|
||||
from praw.errors import HTTPException, PRAWException
|
||||
from .errors import HTTPException, PRAWException
|
||||
from operator import attrgetter
|
||||
|
||||
BACKOFF_START = 4 # Minimum number of seconds to sleep during errors
|
||||
|
||||
@@ -25,8 +25,8 @@ import six
|
||||
import sys
|
||||
from requests import Request, codes, exceptions
|
||||
from requests.compat import urljoin
|
||||
from praw.decorators import restrict_access
|
||||
from praw.errors import (ClientException, HTTPException, Forbidden, NotFound,
|
||||
from .decorators import restrict_access
|
||||
from .errors import (ClientException, HTTPException, Forbidden, NotFound,
|
||||
InvalidSubreddit, OAuthException,
|
||||
OAuthInsufficientScope, OAuthInvalidToken,
|
||||
RedirectException)
|
||||
|
||||
@@ -5,8 +5,8 @@ from __future__ import print_function, unicode_literals
|
||||
import socket
|
||||
import sys
|
||||
from optparse import OptionParser
|
||||
from praw import __version__
|
||||
from praw.handlers import DefaultHandler
|
||||
from . import __version__
|
||||
from .handlers import DefaultHandler
|
||||
from requests import Session
|
||||
from six.moves import cPickle, socketserver # pylint: disable=F0401
|
||||
from threading import Lock
|
||||
|
||||
@@ -30,15 +30,15 @@ from heapq import heappop, heappush
|
||||
from json import dumps
|
||||
from requests.compat import urljoin
|
||||
from warnings import warn, warn_explicit
|
||||
from praw import (AuthenticatedReddit as AR, ModConfigMixin as MCMix,
|
||||
from . import (AuthenticatedReddit as AR, ModConfigMixin as MCMix,
|
||||
ModFlairMixin as MFMix, ModLogMixin as MLMix,
|
||||
ModOnlyMixin as MOMix, ModSelfMixin as MSMix,
|
||||
MultiredditMixin as MultiMix, PrivateMessagesMixin as PMMix,
|
||||
SubmitMixin, SubscribeMixin, UnauthenticatedReddit as UR)
|
||||
from praw.decorators import (alias_function, limit_chars, restrict_access,
|
||||
from .decorators import (alias_function, limit_chars, restrict_access,
|
||||
deprecated)
|
||||
from praw.errors import ClientException
|
||||
from praw.internal import (_get_redditor_listing, _get_sorter,
|
||||
from .errors import ClientException
|
||||
from .internal import (_get_redditor_listing, _get_sorter,
|
||||
_modify_relationship)
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def main():
|
||||
|
||||
# Overwrite the project files
|
||||
src = os.path.join(tmpdir, 'praw')
|
||||
dest = os.path.join(ROOT, 'packages', 'praw')
|
||||
dest = os.path.join(ROOT, 'rtv', 'packages', 'praw')
|
||||
print('Copying package files to %s' % dest)
|
||||
shutil.rmtree(dest, ignore_errors=True)
|
||||
shutil.copytree(src, dest)
|
||||
|
||||
Reference in New Issue
Block a user