kopia lustrzana https://github.com/simonw/datasette
* Switch to ~= dependencies, closes #532 * Bump click and click-default-group * imp. is deprecated, use types.ModuleType instead - thanks https://stackoverflow.com/a/32175781 * Upgrade to pytest 5plugin-config
rodzic
4d2fdafe39
commit
f0d32da0a9
|
@ -3,7 +3,6 @@ from collections import OrderedDict
|
|||
import base64
|
||||
import click
|
||||
import hashlib
|
||||
import imp
|
||||
import json
|
||||
import os
|
||||
import pkg_resources
|
||||
|
@ -11,6 +10,7 @@ import re
|
|||
import shlex
|
||||
import tempfile
|
||||
import time
|
||||
import types
|
||||
import shutil
|
||||
import urllib
|
||||
import numbers
|
||||
|
@ -588,7 +588,7 @@ def link_or_copy_directory(src, dst):
|
|||
|
||||
def module_from_path(path, name):
|
||||
# Adapted from http://sayspy.blogspot.com/2011/07/how-to-import-module-from-just-file.html
|
||||
mod = imp.new_module(name)
|
||||
mod = types.ModuleType(name)
|
||||
mod.__file__ = path
|
||||
with open(path, "r") as file:
|
||||
code = compile(file.read(), path, "exec", dont_inherit=True)
|
||||
|
|
26
setup.py
26
setup.py
|
@ -41,14 +41,14 @@ setup(
|
|||
package_data={"datasette": ["templates/*.html"]},
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
"click>=6.7",
|
||||
"click-default-group==1.2",
|
||||
"Jinja2==2.10.1",
|
||||
"hupper==1.0",
|
||||
"pint==0.8.1",
|
||||
"pluggy>=0.12.0",
|
||||
"uvicorn>=0.8.1",
|
||||
"aiofiles==0.4.0",
|
||||
"click~=7.0",
|
||||
"click-default-group~=1.2.1",
|
||||
"Jinja2~=2.10.1",
|
||||
"hupper~=1.0",
|
||||
"pint~=0.8.1",
|
||||
"pluggy~=0.12.0",
|
||||
"uvicorn~=0.8.1",
|
||||
"aiofiles~=0.4.0",
|
||||
],
|
||||
entry_points="""
|
||||
[console_scripts]
|
||||
|
@ -58,11 +58,11 @@ setup(
|
|||
extras_require={
|
||||
"docs": ["sphinx_rtd_theme", "sphinx-autobuild"],
|
||||
"test": [
|
||||
"pytest==4.6.1",
|
||||
"pytest-asyncio==0.10.0",
|
||||
"aiohttp==3.5.3",
|
||||
"beautifulsoup4==4.6.1",
|
||||
"asgiref==3.1.2",
|
||||
"pytest~=5.0.0",
|
||||
"pytest-asyncio~=0.10.0",
|
||||
"aiohttp~=3.5.3",
|
||||
"beautifulsoup4~=4.6.1",
|
||||
"asgiref~=3.1.2",
|
||||
]
|
||||
+ maybe_black,
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue