Enable installation with pip

main
Vitaly Potyarkin 2019-09-27 11:03:16 +03:00
parent 0c6fd9e5c3
commit c66ac71cf7
5 changed files with 60 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
*.pyc*
dist/
build/
*.egg-info/
.venv*

4
MANIFEST.in Normal file
View File

@ -0,0 +1,4 @@
recursive-include alchemy *
include LICENSE
include README.md
include screenshot.jpg

View File

@ -20,6 +20,8 @@ Inspired by [crowsfoot](http://github.com/porterjamesj/crowsfoot) and [clean-blo
## Installation
### From Git repo
Clone the repo:
```bash
@ -47,6 +49,21 @@ And in Pelican config:
THEME = 'themes/pelican-alchemy/alchemy'
```
### With pip
Alternatively, you can install this theme with pip:
```bash
pip install "https://github.com/nairobilug/pelican-alchemy/tarball/master"
```
And import it from Pelican config:
```python
import alchemy
THEME = alchemy.path()
```
## Usage
Visit the [Settings wiki](https://github.com/nairobilug/pelican-alchemy/wiki/Settings) for examples:

14
alchemy/__init__.py Normal file
View File

@ -0,0 +1,14 @@
'''
A functional, clean, responsive Pelican theme
'''
from pkg_resources import resource_filename
def path():
'''
Return path to theme templates and assets
Use this as value for THEME in Pelican settings
'''
return resource_filename(__name__, '')

19
setup.py Normal file
View File

@ -0,0 +1,19 @@
from setuptools import setup
setup(
name='alchemy',
version='2.2',
description='A functional, clean, responsive Pelican theme',
url='https://github.com/nairobilug/pelican-alchemy',
author='Nairobi GNU/Linux Users Group',
license='MIT',
platforms='any',
entry_points={},
packages=['alchemy'],
include_package_data=True,
install_requires=[
'pelican',
],
zip_safe=False,
)