mirror of https://github.com/nucypher/nucypher.git
Remove imported 'tests' reference from packaged constants.
parent
9a99fe7bd3
commit
65a41e7f33
|
@ -16,15 +16,13 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
|
||||
import os
|
||||
from collections import namedtuple
|
||||
from os.path import dirname
|
||||
from pathlib import Path
|
||||
|
||||
import os
|
||||
from appdirs import AppDirs
|
||||
|
||||
import nucypher
|
||||
from nucypher.exceptions import DevelopmentInstallationRequired
|
||||
|
||||
# Environment variables
|
||||
NUCYPHER_ENVVAR_KEYRING_PASSWORD = "NUCYPHER_KEYRING_PASSWORD"
|
||||
|
@ -34,23 +32,11 @@ NUCYPHER_ENVVAR_ALICE_ETH_PASSWORD = "NUCYPHER_ALICE_ETH_PASSWORD"
|
|||
NUCYPHER_ENVVAR_PROVIDER_URI = "NUCYPHER_PROVIDER_URI"
|
||||
NUCYPHER_ENVVAR_WORKER_IP_ADDRESS = 'NUCYPHER_WORKER_IP_ADDRESS'
|
||||
|
||||
|
||||
# Base Filepaths
|
||||
NUCYPHER_PACKAGE = Path(nucypher.__file__).parent.resolve()
|
||||
BASE_DIR = NUCYPHER_PACKAGE.parent.resolve()
|
||||
DEPLOY_DIR = BASE_DIR / 'deploy'
|
||||
|
||||
# Test Filepaths
|
||||
try:
|
||||
import tests
|
||||
except ImportError:
|
||||
raise DevelopmentInstallationRequired(importable_name='tests')
|
||||
else:
|
||||
# TODO: Another way to handle this situation?
|
||||
# __file__ can be None, especially with namespace packages on
|
||||
# Python 3.7 or when using apidoc and sphinx-build.
|
||||
file_path = tests.__file__
|
||||
NUCYPHER_TEST_DIR = dirname(file_path) if file_path is not None else str()
|
||||
NUCYPHER_TEST_DIR = BASE_DIR / 'tests'
|
||||
|
||||
# User Application Filepaths
|
||||
APP_DIR = AppDirs(nucypher.__title__, nucypher.__author__)
|
||||
|
|
|
@ -16,12 +16,11 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import string
|
||||
import tempfile
|
||||
import time
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from random import SystemRandom
|
||||
|
||||
import tempfile
|
||||
from random import SystemRandom
|
||||
from web3 import Web3
|
||||
|
||||
from nucypher.blockchain.eth.token import NU
|
||||
|
|
Loading…
Reference in New Issue