Skip to content

Commit edadc16

Browse files
committed
Prepare project to PyPI
1 parent 0d3804f commit edadc16

3 files changed

Lines changed: 58 additions & 12 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Control systemd services through Web or REST API
33

44
## Installation
55

6+
### From source
7+
68
```sh
79
git clone https://github.com/ogarcia/sysdweb.git
810
virtualenv3 ./sysdweb-venv
@@ -12,6 +14,16 @@ pip install -r requirements.txt
1214
python setup.py install
1315
```
1416

17+
### From pypi
18+
19+
```sh
20+
virtualenv3 ./sysdweb-venv
21+
source ./sysdweb-venv/bin/activate
22+
pip install sysdweb
23+
```
24+
25+
### For Arch Linux users
26+
1527
Arch Linux users can install sysdweb from [AUR][1].
1628

1729
## Run

setup.py

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
#
77
# Distributed under terms of the GNU GPLv3 license.
88

9+
import sysdweb as project
10+
911
import os
12+
from pip.download import PipSession
13+
from pip.req import parse_requirements
14+
from setuptools import find_packages
1015
from setuptools import setup
1116

1217
# Utility function to read the README file.
@@ -17,16 +22,19 @@ def read(fname):
1722
return open(os.path.join(os.path.dirname(__file__), fname)).read()
1823

1924
setup(
20-
name = "sysdweb",
21-
version = "1.0",
22-
author = "Oscar Garcia Amor",
23-
author_email = "[email protected]",
24-
description = ("Control systemd services through Web or REST API"),
25-
license = "GPLv3",
26-
keywords = "systemd web api easy",
27-
url = "https://github.com/ogarcia/sysdweb",
28-
packages=['sysdweb'],
25+
name = project.NAME,
26+
version = project.VERSION,
27+
author = project.AUTHOR_NAME,
28+
author_email = project.AUTHOR_EMAIL,
29+
description = project.DESCRIPTION,
30+
license = project.LICENSE,
31+
keywords = project.KEYWORDS,
32+
url = project.URL,
2933
long_description=read('README.md'),
34+
packages=find_packages(),
35+
install_requires=[str(x.req) for x in
36+
parse_requirements('requirements.txt',
37+
session=PipSession())],
3038
package_data={'sysdweb': [
3139
'templates/static/css/*',
3240
'templates/static/fonts/*',
@@ -41,9 +49,20 @@ def read(fname):
4149
]
4250
},
4351
classifiers=[
44-
"Development Status :: 3 - Alpha",
45-
"Topic :: Utilities",
46-
"License :: OSI Approved :: GNU General Public License (GPLv3)",
52+
'Development Status :: 5 - Production/Stable',
53+
'Environment :: Web Environment',
54+
'Framework :: Bottle',
55+
'Intended Audience :: End Users/Desktop',
56+
'Intended Audience :: System Administrators',
57+
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
58+
'Natural Language :: English',
59+
'Operating System :: POSIX :: Linux',
4760
'Programming Language :: Python :: 3',
61+
'Topic :: System',
62+
'Topic :: Utilities',
4863
],
64+
project_urls={
65+
'Bug Reports': 'https://github.com/ogarcia/sysdweb/issues',
66+
'Source': 'https://github.com/ogarcia/sysdweb',
67+
},
4968
)

sysdweb/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: utf-8 -*-
2+
# vim:fenc=utf-8
3+
#
4+
# Copyright © 2016-2018 Óscar García Amor <[email protected]>
5+
#
6+
# Distributed under terms of the GNU GPLv3 license.
7+
8+
NAME = 'sysdweb'
9+
VERSION = '1.1.1'
10+
AUTHOR_NAME = 'Óscar García Amor'
11+
AUTHOR_EMAIL = '[email protected]'
12+
DESCRIPTION = 'Control systemd services through Web or REST API'
13+
KEYWORDS = 'systemd web api easy'
14+
URL = 'https://github.com/ogarcia/sysdweb'
15+
LICENSE = 'GPLv3'

0 commit comments

Comments
 (0)