Add setup.py, move stuff into srht/

This commit is contained in:
Drew DeVault 2017-02-08 06:43:47 -05:00
parent 434a84885c
commit 15de752736
12 changed files with 31 additions and 0 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ lib/
pip-selfcheck.json
.sass-cache/
node_modules
build

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "scss/bootstrap"]
path = scss/bootstrap
url = https://github.com/twbs/bootstrap.git
[submodule "srht/scss/bootstrap"]
path = srht/scss/bootstrap
url = https://github.com/twbs/bootstrap.git

27
setup.py Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env python3
from distutils.core import setup
import subprocess
import glob
setup(
name = 'srht',
packages = ['srht'],
version = subprocess.run(['git', 'describe', '--tags'],
stdout=subprocess.PIPE).stdout.decode().strip(),
description = 'sr.ht core modules',
author = 'Drew DeVault',
author_email = 'sir@cmpwn.com',
url = 'https://git.sr.ht/~sircmpwn/srht',
requires = ['flask', 'humanize', 'sqlalchemy'],
license = 'GPL-2.0',
package_data={
'srht': [
'Makefile',
'minify-css.js',
'package.json',
'templates/*.html',
'scss/*.scss',
'scss/bootstrap/LICENSE',
] + [f[5:] for f in glob.glob('srht/node_modules/**', recursive=True)] \
+ [f[5:] for f in glob.glob('srht/scss/bootstrap/scss/**/*.scss', recursive=True)]
}
)

0
srht/__init__.py Normal file
View File