mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
added missing comma to setup.py's tests_require list
removed package.json from project as it is no longer required removed npm install command from .travis/install.sh
This commit is contained in:
parent
8d98b9111e
commit
61b6ff21e1
@ -6,7 +6,6 @@ python setup.py -q install
|
|||||||
pip install -r extra_requirements.txt
|
pip install -r extra_requirements.txt
|
||||||
pip install coverage pytest-cov coveralls
|
pip install coverage pytest-cov coveralls
|
||||||
pip install codecov
|
pip install codecov
|
||||||
npm install
|
|
||||||
|
|
||||||
if [ "$WR_TEST" = "yes" ]; then
|
if [ "$WR_TEST" = "yes" ]; then
|
||||||
git clone https://github.com/webrecorder/webrecorder-tests.git
|
git clone https://github.com/webrecorder/webrecorder-tests.git
|
||||||
|
34
package.json
34
package.json
@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "pywb",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "Web archival replay tools",
|
|
||||||
"main": "index.js",
|
|
||||||
"directories": {
|
|
||||||
"doc": "doc",
|
|
||||||
"test": "tests"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/ikreymer/pywb.git"
|
|
||||||
},
|
|
||||||
"author": "",
|
|
||||||
"license": "GPL-3.0",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/ikreymer/pywb/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/ikreymer/pywb#readme",
|
|
||||||
"devDependencies": {
|
|
||||||
"chai": "^3.4.1",
|
|
||||||
"karma": "^0.13.15",
|
|
||||||
"karma-chai": "^0.1.0",
|
|
||||||
"karma-chrome-launcher": "^0.2.1",
|
|
||||||
"karma-firefox-launcher": "^0.1.7",
|
|
||||||
"karma-html2js-preprocessor": "^0.1.0",
|
|
||||||
"karma-mocha": "^0.2.1",
|
|
||||||
"karma-sauce-launcher": "^0.3.0",
|
|
||||||
"mocha": "^2.3.4"
|
|
||||||
}
|
|
||||||
}
|
|
26
setup.py
26
setup.py
@ -18,12 +18,14 @@ def get_ldecription():
|
|||||||
|
|
||||||
class PyTest(TestCommand):
|
class PyTest(TestCommand):
|
||||||
user_options = []
|
user_options = []
|
||||||
|
|
||||||
def finalize_options(self):
|
def finalize_options(self):
|
||||||
TestCommand.finalize_options(self)
|
TestCommand.finalize_options(self)
|
||||||
self.test_suite = ' '
|
self.test_suite = ' '
|
||||||
|
|
||||||
def run_tests(self):
|
def run_tests(self):
|
||||||
from gevent.monkey import patch_all; patch_all()
|
from gevent.monkey import patch_all
|
||||||
|
patch_all()
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import os
|
import os
|
||||||
@ -36,7 +38,6 @@ class PyTest(TestCommand):
|
|||||||
sys.exit(errcode)
|
sys.exit(errcode)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_git_short_hash():
|
def get_git_short_hash():
|
||||||
import subprocess
|
import subprocess
|
||||||
try:
|
try:
|
||||||
@ -45,19 +46,19 @@ def get_git_short_hash():
|
|||||||
hash_id = hash_id.decode('utf-8')
|
hash_id = hash_id.decode('utf-8')
|
||||||
|
|
||||||
return hash_id
|
return hash_id
|
||||||
except:
|
except Exception:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
def generate_git_hash_py(pkg, filename='git_hash.py'):
|
def generate_git_hash_py(pkg, filename='git_hash.py'):
|
||||||
try:
|
try:
|
||||||
git_hash = get_git_short_hash()
|
git_hash = get_git_short_hash()
|
||||||
with open(os.path.join(pkg, filename), 'wt') as fh:
|
with open(os.path.join(pkg, filename), 'wt') as fh:
|
||||||
fh.write('git_hash = "{0}"\n'.format(git_hash))
|
fh.write('git_hash = "{0}"\n'.format(git_hash))
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def load_requirements(filename):
|
def load_requirements(filename):
|
||||||
with open(filename, 'rt') as fh:
|
with open(filename, 'rt') as fh:
|
||||||
requirements = fh.read().rstrip().split('\n')
|
requirements = fh.read().rstrip().split('\n')
|
||||||
@ -67,6 +68,7 @@ def load_requirements(filename):
|
|||||||
requirements.append("pyAMF")
|
requirements.append("pyAMF")
|
||||||
return requirements
|
return requirements
|
||||||
|
|
||||||
|
|
||||||
def get_package_data():
|
def get_package_data():
|
||||||
pkgs = ['static/*.*',
|
pkgs = ['static/*.*',
|
||||||
'templates/*',
|
'templates/*',
|
||||||
@ -79,10 +81,8 @@ def get_package_data():
|
|||||||
return pkgs
|
return pkgs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
generate_git_hash_py('pywb')
|
generate_git_hash_py('pywb')
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pywb',
|
name='pywb',
|
||||||
version=__version__,
|
version=__version__,
|
||||||
@ -96,7 +96,7 @@ setup(
|
|||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
package_data={
|
package_data={
|
||||||
'pywb': get_package_data(),
|
'pywb': get_package_data(),
|
||||||
},
|
},
|
||||||
data_files=[
|
data_files=[
|
||||||
('sample_archive/cdx', glob.glob('sample_archive/cdx/*')),
|
('sample_archive/cdx', glob.glob('sample_archive/cdx/*')),
|
||||||
('sample_archive/cdxj', glob.glob('sample_archive/cdxj/*')),
|
('sample_archive/cdxj', glob.glob('sample_archive/cdxj/*')),
|
||||||
@ -104,8 +104,8 @@ setup(
|
|||||||
('sample_archive/zipcdx', glob.glob('sample_archive/zipcdx/*')),
|
('sample_archive/zipcdx', glob.glob('sample_archive/zipcdx/*')),
|
||||||
('sample_archive/warcs', glob.glob('sample_archive/warcs/*')),
|
('sample_archive/warcs', glob.glob('sample_archive/warcs/*')),
|
||||||
('sample_archive/text_content',
|
('sample_archive/text_content',
|
||||||
glob.glob('sample_archive/text_content/*')),
|
glob.glob('sample_archive/text_content/*')),
|
||||||
],
|
],
|
||||||
install_requires=load_requirements('requirements.txt'),
|
install_requires=load_requirements('requirements.txt'),
|
||||||
tests_require=[
|
tests_require=[
|
||||||
'pytest',
|
'pytest',
|
||||||
@ -116,9 +116,9 @@ setup(
|
|||||||
'urllib3',
|
'urllib3',
|
||||||
'werkzeug',
|
'werkzeug',
|
||||||
'httpbin==0.5.0',
|
'httpbin==0.5.0',
|
||||||
'ujson'
|
'ujson',
|
||||||
'lxml',
|
'lxml'
|
||||||
],
|
],
|
||||||
cmdclass={'test': PyTest},
|
cmdclass={'test': PyTest},
|
||||||
test_suite='',
|
test_suite='',
|
||||||
entry_points="""
|
entry_points="""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user