mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-22 09:29:43 +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 tests use the Nose test framework. To get started, ensure you have
|
||||||
the ``virtualenv`` software installed; e.g. on Debian/Ubuntu::
|
the ``virtualenv`` software installed; e.g. on Debian/Ubuntu::
|
||||||
|
|
||||||
sudo apt-get install python-virtualenv
|
sudo apt-get install python3-virtualenv
|
||||||
|
|
||||||
and then run::
|
and then run::
|
||||||
|
|
||||||
|
|
12
bootstrap
12
bootstrap
|
@ -2,7 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -f /etc/debian_version ]; then
|
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
|
if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
|
||||||
# add a space after old values
|
# add a space after old values
|
||||||
missing="${missing:+$missing }$package"
|
missing="${missing:+$missing }$package"
|
||||||
|
@ -13,7 +13,7 @@ if [ -f /etc/debian_version ]; then
|
||||||
sudo apt-get -y install $missing
|
sudo apt-get -y install $missing
|
||||||
fi
|
fi
|
||||||
elif [ -f /etc/fedora-release ]; then
|
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
|
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||||
missing="${missing:+$missing }$package"
|
missing="${missing:+$missing }$package"
|
||||||
fi
|
fi
|
||||||
|
@ -23,7 +23,7 @@ elif [ -f /etc/fedora-release ]; then
|
||||||
sudo yum -y install $missing
|
sudo yum -y install $missing
|
||||||
fi
|
fi
|
||||||
elif [ -f /etc/redhat-release ]; then
|
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
|
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||||
missing="${missing:+$missing }$package"
|
missing="${missing:+$missing }$package"
|
||||||
fi
|
fi
|
||||||
|
@ -34,13 +34,13 @@ elif [ -f /etc/redhat-release ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
virtualenv --no-site-packages --distribute virtualenv
|
virtualenv --no-site-packages --distribute virtualenv -p /usr/bin/python3
|
||||||
|
|
||||||
# avoid pip bugs
|
# avoid pip bugs
|
||||||
./virtualenv/bin/pip install --upgrade pip
|
./virtualenv/bin/pip install --upgrade pip
|
||||||
|
|
||||||
# slightly old version of setuptools; newer fails w/ requests 0.14.0
|
# 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
|
./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
|
# easy_install, and we really wanted pip; next line will fail if pip
|
||||||
# requirements.txt does not match setup.py requirements -- sucky but
|
# requirements.txt does not match setup.py requirements -- sucky but
|
||||||
# good enough for now
|
# good enough for now
|
||||||
./virtualenv/bin/python setup.py develop
|
./virtualenv/bin/python3 setup.py develop
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
PyYAML
|
PyYAML
|
||||||
|
setuptools
|
||||||
nose >=1.0.0
|
nose >=1.0.0
|
||||||
boto >=2.6.0
|
boto >=2.6.0
|
||||||
boto3 >=1.0.0
|
boto3 >=1.0.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import yaml
|
import yaml
|
||||||
|
|
|
@ -227,7 +227,7 @@ def files(mean, stddev, seed=None):
|
||||||
re-download the object and place the contents into a file called
|
re-download the object and place the contents into a file called
|
||||||
``foo``, the following should print two identical lines:
|
``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
|
Except for objects shorter than 16 bytes, where the second line
|
||||||
will be proportionally shorter.
|
will be proportionally shorter.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import yaml
|
import yaml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
import boto3
|
import boto3
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
|
|
@ -227,7 +227,7 @@ def files(mean, stddev, seed=None):
|
||||||
re-download the object and place the contents into a file called
|
re-download the object and place the contents into a file called
|
||||||
``foo``, the following should print two identical lines:
|
``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
|
Except for objects shorter than 16 bytes, where the second line
|
||||||
will be proportionally shorter.
|
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
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|
Loading…
Reference in a new issue