Skip to content

Commit

Permalink
Merge b872ef5 into 49b733a
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouhei committed May 9, 2014
2 parents 49b733a + b872ef5 commit c9e38dd
Show file tree
Hide file tree
Showing 22 changed files with 327 additions and 306 deletions.
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
language: python
python:
- "2.7"
- "3.2"
- "3.3"
python: 2.7
env:
- TOX_ENV=py27
- TOX_ENV=py32
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=pypy
install:
- pip install coveralls tox
script:
- bash utils/testing_travis.sh
- tox -e $TOX_ENV
- python setup.py check -r
after_success:
- coveralls --verbose
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include MANIFEST.in
include README.rst
include LICENSE
include requirements.txt
recursive-include docs *.rst
recursive-include src *.py *.txt
recursive-include swiftsc *.py *.txt
1 change: 0 additions & 1 deletion README

This file was deleted.

11 changes: 9 additions & 2 deletions docs/README.rst → README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ This tool is simple client library of OpenStack Swift.
This tool is intended to be used in the module and Python script other.
The main purpose of this tool is used as a core module for backup tool.

.. image:: https://secure.travis-ci.org/mkouhei/swiftsc.png?branch=devel
:target: http://travis-ci.org/mkouhei/swiftsc
.. image:: https://coveralls.io/repos/mkouhei/swiftsc/badge.png?branch=devel
:target: https://coveralls.io/r/mkouhei/swiftsc?branch=devel
.. image:: https://pypip.in/v/swiftsc/badge.png
:target: https://crate.io/packages/swiftsc


Requirements
------------
Expand Down Expand Up @@ -50,9 +57,9 @@ Firstly copy pre-commit hook script.::
Debian systems
^^^^^^^^^^^^^^

Next install python2.7, python3.2 later, and python-requests, python-magic, py.test, mock, pep8. Below in Debian GNU/Linux Sid system,::
Next install python2.7, python3.2 later, and python-requests, python-magic, python-tox, pychecker. Below in Debian GNU/Linux Sid system,::

$ sudo apt-get install python python-requests python-pytest pep8 python-magic python-mock python3-requests python3-pytest python3-magic python3-mock
$ sudo apt-get install python python-requests python-pytest pep8 python-magic python-tox pychecker

Then checkout 'devel' branch for development, commit your changes. Before pull request, execute git rebase.

Expand Down
7 changes: 7 additions & 0 deletions docs/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
History
-------

0.5.2 (2014-05-10)
^^^^^^^^^^^^^^^^^^

* refactoring
* support python 3.4, PyPI
* apply tox for unit test

0.5.1 (2013-11-06)
^^^^^^^^^^^^^^^^^^

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pep8>=1.3
mock>=0.8
requests>=0.12.1
-e git+https://github.com/ahupp/python-magic.git#egg=python-magic
pep8>=1.3
pytest
httpretty
52 changes: 30 additions & 22 deletions setup.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Copyright (C) 2013 Kouhei Maeda <mkouhei@palmtb.net>
Copyright (C) 2013, 2014 Kouhei Maeda <mkouhei@palmtb.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -20,34 +20,51 @@
import sys
import subprocess
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import multiprocessing


class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
import tox
errno = tox.cmdline(self.test_args)
sys.exit(errno)

sys.path.insert(0, 'src')
import swiftsc

classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: OSI Approved :: "
"GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
"Environment :: OpenStack",
]

long_description = \
open(os.path.join("docs","README.rst")).read() + \
open(os.path.join("docs","TODO.rst")).read() + \
open(os.path.join("docs","HISTORY.rst")).read()
long_description = (
open("README.rst").read() +
open(os.path.join("docs", "TODO.rst")).read() +
open(os.path.join("docs", "HISTORY.rst")).read())


def is_debian_system():
fnull = open(os.devnull, 'w')
if (subprocess.call(['which', 'apt-get'], stdout=fnull) == 0 and
subprocess.call(['apt-cache', 'show', 'python-magic'], stdout=fnull) == 0):
subprocess.call(['apt-cache', 'show', 'python-magic'],
stdout=fnull) == 0):
fnull.close()
return True
else:
Expand All @@ -60,24 +77,15 @@ def is_debian_system():


setup(name='swiftsc',
version='0.5.1',
version='0.5.2',
description='Simple client library of OpenStack Swift',
long_description=long_description,
author='Kouhei Maeda',
author_email='mkouhei@palmtb.net',
url='https://github.com/mkouhei/swiftsc',
license=' GNU General Public License version 3',
classifiers=classifiers,
packages=find_packages('src'),
package_dir={'': 'src'},
packages=find_packages(),
install_requires=requires,
extras_require=dict(
test=[
'pytest',
'pep8',
'mock',
],
),
test_suite='tests',
tests_require=['pytest','pep8', 'mock'],
)
tests_require=['tox'],
cmdclass={'test': Tox},)
167 changes: 0 additions & 167 deletions src/swiftsc_tests/test_client.py

This file was deleted.

0 comments on commit c9e38dd

Please sign in to comment.