Skip to content

Commit

Permalink
initial 0.1.0 release
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Tomecek <[email protected]>
  • Loading branch information
TomasTomecek committed May 2, 2019
1 parent f06fed9 commit 590dece
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
specfile_path: hello.spec
synced_files:
- hello.spec
downstream_package_name: hello
jobs:
- job: copr_build
trigger: pull_request
metadata:
targets:
- rhelbeta-8-x86_64
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# hello-world
The most progresive command-line tool in the world.

```
$ hello world
Hello world!
```
36 changes: 36 additions & 0 deletions hello.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Name: hello
Version: 0.1.0
Release: 1%{?dist}
Summary: Nice and a polite tool

License: MIT
URL: https://github.com/packit-service/hello-world
Source0: hello-0.1.0.tar.gz
BuildArch: noarch
BuildRequires: python3-devel

%description
%{summary}


%prep
%autosetup -n %{name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install

%files
%license LICENSE
%{_bindir}/hello
%{python3_sitelib}/*
%doc README.md

%changelog
* Thu May 02 2019 Tomas Tomecek <[email protected]> - 0.1.0-1
- initial upstream release: 0.1.0

47 changes: 47 additions & 0 deletions hello_world/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/python3

# MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__version__ = "0.1.0"

import sys


def usage():
print(
"Usage: hello NAME\n"
)
sys.exit(3)


def main():
args_n = len(sys.argv)
if args_n <= 1:
usage()
elif args_n > 2:
usage()
print(f"Hello {sys.argv[1]}")


if __name__ == '__main__':
main()
31 changes: 31 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[metadata]
name = hello
version = 0.1.0
url = https://github.com/packit-service/hello
description = Nice and a polite tool
long_description = file: README.md
long_description_content_type = text/markdown
author = Red Hat
author_email = [email protected]
license = MIT
license_file = LICENSE
classifiers =
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
keywords =
hello


[options]
packages = find:
python_requires = >=3.6
include_package_data = True

[options.entry_points]
console_scripts =
hello=hello_world:main
27 changes: 27 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/python3

# MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from setuptools import setup

setup()

0 comments on commit 590dece

Please sign in to comment.