Skip to content
Snippets Groups Projects
Commit 2aff4093 authored by Marek Chrastina's avatar Marek Chrastina
Browse files

Add setup.py and __init__.py

parent ef9d4d04
No related branches found
No related tags found
1 merge request!1Add py script
Pipeline #7890 failed
...@@ -14,4 +14,5 @@ pylint: ...@@ -14,4 +14,5 @@ pylint:
- export PYTHONIOENCODING=UTF-8 - export PYTHONIOENCODING=UTF-8
- export LC_CTYPE=en_US.UTF-8 - export LC_CTYPE=en_US.UTF-8
- if [ -f pip-upgradedependencies.egg-info/requires.txt ]; then pip install $(paste -d " " -s pip-upgradedependencies.egg-info/requires.txt); fi - if [ -f pip-upgradedependencies.egg-info/requires.txt ]; then pip install $(paste -d " " -s pip-upgradedependencies.egg-info/requires.txt); fi
- pip install better-setuptools-git-version
- pylint $(find . -type f -name "*.py") - pylint $(find . -type f -name "*.py")
...@@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively ...@@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
pip-upgradedependencies pipupgradedependencies
Copyright (C) 2019 IT4Innovations National Supercomputing Center, Copyright (C) 2019 IT4Innovations National Supercomputing Center,
VSB - Technical University of Ostrava, Czech Republic VSB - Technical University of Ostrava, Czech Republic
...@@ -653,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail. ...@@ -653,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode: notice like this when it starts in an interactive mode:
pip-upgradedependencies Copyright (C) 2019 pipupgradedependencies Copyright (C) 2019
IT4Innovations National Supercomputing Center, IT4Innovations National Supercomputing Center,
VSB - Technical University of Ostrava, Czech Republic VSB - Technical University of Ostrava, Czech Republic
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
......
# pip-upgradedependencies # pipupgradedependencies
Pip-upgradedependencies upgrades all outdated packages with respect to existing dependencies. Pipupgradedependencies upgrades all outdated packages with respect to existing dependencies.
Python 2.7 is required. Python 2.7 is required.
## Usage ## Usage
```console ```console
pip-upgradedependencies pipupgradedependencies
``` ```
__import__('pkg_resources').declare_namespace(__name__)
...@@ -18,10 +18,11 @@ def find_dependencies(json_input, package): ...@@ -18,10 +18,11 @@ def find_dependencies(json_input, package):
for item_val in find_dependencies(item, package): for item_val in find_dependencies(item, package):
yield item_val yield item_val
def arg_parse(): def arg_parse():
parser = argparse.ArgumentParser(description="Pip-upgradedependencies upgrades all outdated packages with respect to existing dependencies.") parser = argparse.ArgumentParser(description="Pipupgradedependencies upgrades all outdated packages with respect to existing dependencies.")
parser_args = parser.parse_args() parser_args = parser.parse_args()
def main(): def main():
arg_parse()
os.environ["PYTHONWARNINGS"] = "ignore:DEPRECATION" os.environ["PYTHONWARNINGS"] = "ignore:DEPRECATION"
try: try:
...@@ -70,5 +71,4 @@ def main(): ...@@ -70,5 +71,4 @@ def main():
print "Done." print "Done."
if __name__ == "__main__": if __name__ == "__main__":
arg_parse()
main() main()
setup.py 0 → 100644
from setuptools import setup, find_packages
setup(
name='pipupgradedependencies',
description='Pipupgradedependencies upgrades all outdated packages with respect to existing dependencies.',
classifiers=[
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
],
author='IT4Innovations',
author_email='support@it4i.cz',
url='https://code.it4i.cz/sccs/pip-upgradedependencies',
license='GPLv3+',
packages=find_packages(),
namespace_packages=['pipupgradedependencies'],
zip_safe=False,
version_config={
"version_format": "{tag}",
"starting_version": "0.0.1"
},
long_description_markdown_filename='README.md',
setup_requires=['better-setuptools-git-version', 'setuptools-markdown'],
entry_points={
'console_scripts': [
'pipupgradedependencies = pipupgradedependencies.pipupgradedependencies:main',
]
},
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment