Small cleanups

- Remove Babel from requirements, it's not needed for running.
- remove unused file setup.sh
- Update to hacking 3.1.0; fix problems found.
- Remove hacking and friends from lower-constraints, they are not
  needed there at all.

Depends-On: https://review.opendev.org/736382
Change-Id: I8b2a8c06de0282f797fab51d90aeac1ca2eef9c4
This commit is contained in:
Andreas Jaeger 2020-06-18 08:19:12 +02:00
parent acc71afab3
commit 8054a326d1
7 changed files with 7 additions and 177 deletions

View File

@ -1,7 +1,6 @@
alabaster==0.7.10
appdirs==1.3.0
asn1crypto==0.23.0
Babel==2.3.4
cffi==1.7.0
cliff==2.8.0
cmd2==0.8.0
@ -16,9 +15,7 @@ dulwich==0.15.0
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
flake8==2.5.5
future==0.16.0
hacking==0.12.0
idna==2.6
imagesize==0.7.1
iso8601==0.1.11
@ -30,7 +27,6 @@ jsonschema==2.6.0
keystoneauth1==3.4.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
monotonic==0.6
mox3==0.20.0
msgpack-python==0.4.0
@ -53,13 +49,11 @@ oslo.utils==3.33.0
oslotest==3.2.0
paramiko==2.0.0
pbr==2.0.0
pep8==1.5.7
ply==3.10
positional==1.2.1
prettytable==0.7.2
pyasn1==0.1.8
pycparser==2.18
pyflakes==0.8.1
Pygments==2.2.0
pyinotify==0.9.6
pyOpenSSL==17.1.0

View File

@ -53,7 +53,7 @@ def prepare_package(args):
f.write(yaml.dump(manifest, default_flow_style=False))
logo_file = os.path.join(temp_dir, 'logo.png')
if not args.logo or(args.logo and not os.path.isfile(args.logo)):
if not args.logo or (args.logo and not os.path.isfile(args.logo)):
shutil.copyfile(muranoclient.get_resource('mpl_logo.png'), logo_file)
else:
shutil.copyfile(args.logo, logo_file)

View File

@ -43,7 +43,7 @@ class SchemaManager(base.Manager):
key: value for key, value in (
('classVersion', class_version),
('packageName', package_name)) if value
}
}
if len(params):
base_url += '?' + urllib.parse.urlencode(params, True)

View File

@ -6,7 +6,6 @@ PrettyTable<0.8,>=0.7.2 # BSD
python-glanceclient>=2.8.0 # Apache-2.0
python-keystoneclient>=3.8.0 # Apache-2.0
iso8601>=0.1.11 # MIT
Babel!=2.4.0,>=2.3.4 # BSD
pyOpenSSL>=17.1.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
PyYAML>=3.12 # MIT

167
setup.sh
View File

@ -1,167 +0,0 @@
#!/bin/sh
# Copyright (c) 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Ubuntu script.
LOGLVL=1
SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd`
PREREQ_PKGS="wget make git python-pip python-dev python-mysqldb libxml2-dev libxslt-dev"
SERVICE_SRV_NAME="python-muranoclient"
GIT_CLONE_DIR=`echo $SERVICE_CONTENT_DIRECTORY | sed -e "s/$SERVICE_SRV_NAME//"`
# Functions
# Loger function
log()
{
MSG=$1
if [ $LOGLVL -gt 0 ]; then
echo "LOG:> $MSG"
fi
}
# Check or install package
in_sys_pkg()
{
PKG=$1
dpkg -s $PKG > /dev/null 2>&1
if [ $? -eq 0 ]; then
log "Package \"$PKG\" already installed"
else
log "Installing \"$PKG\"..."
apt-get install $PKG --yes > /dev/null 2>&1
if [ $? -ne 0 ];then
log "installation fails, exiting!!!"
exit
fi
fi
}
# git clone
gitclone()
{
FROM=$1
CLONEROOT=$2
log "Cloning from \"$FROM\" repo to \"$CLONEROOT\""
cd $CLONEROOT && git clone $FROM > /dev/null 2>&1
if [ $? -ne 0 ];then
log "cloning from \"$FROM\" fails, exiting!!!"
exit
fi
}
# install
inst()
{
CLONE_FROM_GIT=$1
# Checking packages
for PKG in $PREREQ_PKGS
do
in_sys_pkg $PKG
done
# If clone from git set
if [ ! -z $CLONE_FROM_GIT ]; then
# Preparing clone root directory
if [ ! -d $GIT_CLONE_DIR ];then
log "Creating $GIT_CLONE_DIR directory..."
mkdir -p $GIT_CLONE_DIR
if [ $? -ne 0 ];then
log "Can't create $GIT_CLONE_DIR, exiting!!!"
exit
fi
fi
# Cloning from GIT
GIT_WEBPATH_PRFX="https://opendev.org/openstack/"
gitclone "$GIT_WEBPATH_PRFX$SERVICE_SRV_NAME.git" $GIT_CLONE_DIR
# End clone from git section
fi
# Setupping...
log "Running setup.py"
#MRN_CND_SPY=$GIT_CLONE_DIR/$SERVICE_SRV_NAME/setup.py
MRN_CND_SPY=$SERVICE_CONTENT_DIRECTORY/setup.py
if [ -e $MRN_CND_SPY ]; then
chmod +x $MRN_CND_SPY
log "$MRN_CND_SPY output:_____________________________________________________________"
#cd $GIT_CLONE_DIR/$SERVICE_SRV_NAME && $MRN_CND_SPY install
#if [ $? -ne 0 ]; then
# log "\"$MRN_CND_SPY\" python setup FAILS, exiting!"
# exit 1
#fi
## Setup through pip
# Creating tarball
#cd $GIT_CLONE_DIR/$SERVICE_SRV_NAME && $MRN_CND_SPY sdist
rm -rf $SERVICE_CONTENT_DIRECTORY/*.egg-info
cd $SERVICE_CONTENT_DIRECTORY && python $MRN_CND_SPY egg_info
if [ $? -ne 0 ];then
log "\"$MRN_CND_SPY\" egg info creation FAILS, exiting!!!"
exit 1
fi
rm -rf $SERVICE_CONTENT_DIRECTORY/dist/*
cd $SERVICE_CONTENT_DIRECTORY && python $MRN_CND_SPY sdist
if [ $? -ne 0 ];then
log "\"$MRN_CND_SPY\" tarball creation FAILS, exiting!!!"
exit 1
fi
# Running tarball install
#TRBL_FILE=$(basename `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/*.tar.gz`)
#pip install $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/$TRBL_FILE
TRBL_FILE=$(basename `ls $SERVICE_CONTENT_DIRECTORY/dist/*.tar.gz`)
pip install $SERVICE_CONTENT_DIRECTORY/dist/$TRBL_FILE
if [ $? -ne 0 ];then
log "pip install \"$TRBL_FILE\" FAILS, exiting!!!"
exit 1
fi
else
log "$MRN_CND_SPY not found!"
fi
}
# uninstall
uninst()
{
# Uninstall trough pip
# looking up for python package installed
#PYPKG=`echo $SERVICE_SRV_NAME | tr -d '-'`
PYPKG="muranoclient"
pip freeze | grep $PYPKG
if [ $? -eq 0 ]; then
log "Removing package \"$PYPKG\" with pip"
pip uninstall $PYPKG --yes
else
log "Python package \"$PYPKG\" not found"
fi
}
# Command line args'
COMMAND="$1"
case $COMMAND in
install )
inst
;;
installfromgit )
inst "yes"
;;
uninstall )
log "Uninstalling muranoclient \"$SERVICE_SRV_NAME\" from system..."
uninst
;;
* )
echo "Usage: $(basename "$0") command \nCommands:\n\tinstall - Install $SERVICE_SRV_NAME software\n\tuninstall - Uninstall $SERVICE_SRV_NAME software"
exit 1
;;
esac

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=3.0.1,<3.1.0 # Apache-2.0
hacking>=3.1.0,<3.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD

View File

@ -70,6 +70,10 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
[flake8]
show-source = true
builtins = _
# E741 ambiguous variable name 'l'
# W503 line break before binary operator
# W504 line break after binary operator
ignore = E741,W503,W504
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build
[testenv:lower-constraints]