Skip to content

Commit

Permalink
[GH-86] Add requirement license info.
Browse files Browse the repository at this point in the history
Add license information for each dependencies listed in requirements.txt.
And add a `requirements.os.txt` file for dependency downloading under
openstack cinder/manila environments.
Remove dependency to the future package.
  • Loading branch information
Cedric Zhuang committed Jan 25, 2017
1 parent 460d446 commit edce9d7
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -13,7 +13,7 @@ StorOps: The Python Library for VNX & Unity
.. image:: https://landscape.io/github/emc-openstack/storops/master/landscape.svg?style=flat
:target: https://landscape.io/github/emc-openstack/storops/

VERSION: 0.4.4
VERSION: 0.4.5

A minimalist Python library to manage VNX/Unity systems.
This document lies in the source code and go with the release.
Expand Down
8 changes: 8 additions & 0 deletions requirements.os.txt
@@ -0,0 +1,8 @@
## Please download these files with "--no-deps" option, e.g.
## pip download --no-deps -r <path to>/requirements.os.txt
python-dateutil>=2.4.2 # BSD
retryz>=0.1.8 # Apache-2.0
cachez>=0.1.0 # Apache-2.0
bitmath>=1.3.0 # MIT
queuelib>=1.4.2 # BSD
storops # Apache-2.0
21 changes: 11 additions & 10 deletions requirements.txt
@@ -1,10 +1,11 @@
future>=0.15.1
paramiko>=1.13.0
python-dateutil>=2.4.2
PyYAML>=3.11
requests!=2.9.0,>=2.8.1
retryz>=0.1.8
cachez>=0.1.0
six>=1.9.0
bitmath>=1.3.0
queuelib>=1.4.2
paramiko>=1.13.0 # LGPLv2.1+, cinder, manila
requests!=2.9.0,>=2.8.1 # Apache-2.0, cinder, manila
PyYAML>=3.11 # MIT, cinder, manila
six>=1.9.0 # MIT, cinder, manila
enum34>=1.0.4;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD, cinder

python-dateutil>=2.4.2 # BSD
retryz>=0.1.8 # Apache-2.0
cachez>=0.1.0 # Apache-2.0
bitmath>=1.3.0 # MIT
queuelib>=1.4.2 # BSD
34 changes: 14 additions & 20 deletions setup.py
Expand Up @@ -19,7 +19,6 @@
import io
import os
import re
import sys

from setuptools import setup, find_packages

Expand Down Expand Up @@ -54,14 +53,8 @@ def read_requirements(filename):
return f.read().splitlines()


def install_requirements(filename):
packages = read_requirements(filename)
if sys.version_info < (3, 4):
packages.append("enum34>=1.0.4")


def get_description():
return "Python API for VNX and Unity."
return 'Python API for VNX and Unity.'


def get_long_description():
Expand All @@ -70,29 +63,30 @@ def get_long_description():


setup(
name="storops",
name='storops',
version=version(),
author="Cedric Zhuang",
author_email="cedric.zhuang@gmail.com",
author='Cedric Zhuang',
author_email='cedric.zhuang@gmail.com',
url='https://github.com/emc-openstack/storops',
description=get_description(),
license="Apache Software License",
keywords="VNX",
license='Apache Software License',
keywords='VNX Unity EMC Storage',
include_package_data=True,
packages=find_packages(),
platforms=['any'],
long_description=get_long_description(),
classifiers=[
"Programming Language :: Python",
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
"Natural Language :: English",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Topic :: Utilities",
"License :: OSI Approved :: Apache Software License",
'Natural Language :: English',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Development Status :: 4 - Beta',
'Topic :: Utilities',
'License :: OSI Approved :: Apache Software License',
],
install_requires=read_requirements('requirements.txt'),
tests_require=read_requirements('test-requirements.txt')
Expand Down
1 change: 0 additions & 1 deletion storops/lib/converter.py
Expand Up @@ -23,7 +23,6 @@

import bitmath
import dateutil.parser
from past.builtins import filter
import six

from storops.vnx import enums
Expand Down
5 changes: 2 additions & 3 deletions storops/unity/resource/filesystem.py
Expand Up @@ -16,7 +16,6 @@
from __future__ import unicode_literals

import logging
from past.builtins import filter
from storops.exception import UnityResourceNotFoundError, \
UnityCifsServiceNotEnabledError
from storops.unity.enums import FSSupportedProtocolEnum, TieringPolicyEnum, \
Expand Down Expand Up @@ -135,8 +134,8 @@ def has_snap(self):
:return: false if no snaps or all snaps are destroying.
"""
return len(filter(lambda s: s.state != SnapStateEnum.DESTROYING,
self.snapshots)) > 0
return len(list(filter(lambda s: s.state != SnapStateEnum.DESTROYING,
self.snapshots))) > 0


class UnityFileSystemList(UnityResourceList):
Expand Down
4 changes: 1 addition & 3 deletions storops/vnx/resource/vnx_domain.py
Expand Up @@ -19,8 +19,6 @@
import re
from datetime import datetime

from past.builtins import filter

from storops.lib.common import clear_instance_cache
from storops.lib.converter import to_datetime
from storops.vnx.enums import VNXSPEnum
Expand Down Expand Up @@ -160,7 +158,7 @@ def filter_by_sp_name(member):
sp = VNXSPEnum.parse(member.name)
return sp == index

result = filter(filter_by_sp_name, self.list)
result = list(filter(filter_by_sp_name, self.list))
ret = None
if len(result) > 0:
ret = result[0]
Expand Down

0 comments on commit edce9d7

Please sign in to comment.