mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +00:00
python 3
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
5f4f0a9c38
commit
e3761a30b3
9 changed files with 14 additions and 13 deletions
|
@ -9,7 +9,7 @@ that exposes an S3-like API. The tests use the Boto2 and Boto3 libraries.
|
|||
The tests use the Nose test framework. To get started, ensure you have
|
||||
the ``virtualenv`` software installed; e.g. on Debian/Ubuntu::
|
||||
|
||||
sudo apt-get install python-virtualenv
|
||||
sudo apt-get install python3-virtualenv
|
||||
|
||||
and then run::
|
||||
|
||||
|
|
12
bootstrap
12
bootstrap
|
@ -2,7 +2,7 @@
|
|||
set -e
|
||||
|
||||
if [ -f /etc/debian_version ]; then
|
||||
for package in python-pip python-virtualenv python-dev libevent-dev libffi-dev libxml2-dev libxslt-dev zlib1g-dev; do
|
||||
for package in python3-pip python3-virtualenv python3-dev libevent-dev libffi-dev libxml2-dev libxslt-dev zlib1g-dev; do
|
||||
if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
|
||||
# add a space after old values
|
||||
missing="${missing:+$missing }$package"
|
||||
|
@ -13,7 +13,7 @@ if [ -f /etc/debian_version ]; then
|
|||
sudo apt-get -y install $missing
|
||||
fi
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
for package in python-pip python2-virtualenv python-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
for package in python3-pip python3-virtualenv python3-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||
missing="${missing:+$missing }$package"
|
||||
fi
|
||||
|
@ -23,7 +23,7 @@ elif [ -f /etc/fedora-release ]; then
|
|||
sudo yum -y install $missing
|
||||
fi
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
for package in python-virtualenv python-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
for package in python3-virtualenv python3-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||
missing="${missing:+$missing }$package"
|
||||
fi
|
||||
|
@ -34,13 +34,13 @@ elif [ -f /etc/redhat-release ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
virtualenv --no-site-packages --distribute virtualenv
|
||||
virtualenv --no-site-packages --distribute virtualenv -p /usr/bin/python3
|
||||
|
||||
# avoid pip bugs
|
||||
./virtualenv/bin/pip install --upgrade pip
|
||||
|
||||
# slightly old version of setuptools; newer fails w/ requests 0.14.0
|
||||
./virtualenv/bin/pip install setuptools==32.3.1
|
||||
#./virtualenv/bin/pip install setuptools==32.3.1
|
||||
|
||||
./virtualenv/bin/pip install -r requirements.txt
|
||||
|
||||
|
@ -48,4 +48,4 @@ virtualenv --no-site-packages --distribute virtualenv
|
|||
# easy_install, and we really wanted pip; next line will fail if pip
|
||||
# requirements.txt does not match setup.py requirements -- sucky but
|
||||
# good enough for now
|
||||
./virtualenv/bin/python setup.py develop
|
||||
./virtualenv/bin/python3 setup.py develop
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
PyYAML
|
||||
setuptools
|
||||
nose >=1.0.0
|
||||
boto >=2.6.0
|
||||
boto3 >=1.0.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
import sys
|
||||
import os
|
||||
import yaml
|
||||
|
|
|
@ -227,7 +227,7 @@ def files(mean, stddev, seed=None):
|
|||
re-download the object and place the contents into a file called
|
||||
``foo``, the following should print two identical lines:
|
||||
|
||||
python -c 'import sys, hashlib; data=sys.stdin.read(); print hashlib.md5(data[:-16]).hexdigest(); print "".join("%02x" % ord(c) for c in data[-16:])' <foo
|
||||
python3 -c 'import sys, hashlib; data=sys.stdin.read(); print hashlib.md5(data[:-16]).hexdigest(); print "".join("%02x" % ord(c) for c in data[-16:])' <foo
|
||||
|
||||
Except for objects shorter than 16 bytes, where the second line
|
||||
will be proportionally shorter.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
import sys
|
||||
import os
|
||||
import yaml
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
import boto3
|
||||
import os
|
||||
import random
|
||||
|
|
|
@ -227,7 +227,7 @@ def files(mean, stddev, seed=None):
|
|||
re-download the object and place the contents into a file called
|
||||
``foo``, the following should print two identical lines:
|
||||
|
||||
python -c 'import sys, hashlib; data=sys.stdin.read(); print hashlib.md5(data[:-16]).hexdigest(); print "".join("%02x" % ord(c) for c in data[-16:])' <foo
|
||||
python3 -c 'import sys, hashlib; data=sys.stdin.read(); print hashlib.md5(data[:-16]).hexdigest(); print "".join("%02x" % ord(c) for c in data[-16:])' <foo
|
||||
|
||||
Except for objects shorter than 16 bytes, where the second line
|
||||
will be proportionally shorter.
|
||||
|
|
2
setup.py
2
setup.py
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
|
|
Loading…
Reference in a new issue