working setuptools package distribution

This commit is contained in:
Nick Sweeting 2019-03-27 15:39:30 -04:00
parent 93216a3c3e
commit 64f92af60b
8 changed files with 60 additions and 29 deletions

6
.gitignore vendored
View file

@ -19,3 +19,9 @@ output/
data
data/
archivebox/output
archivebox/data
archivebox/VERSION
archivebox.egg-info/
build/
dist/

3
MANIFEST.in Normal file
View file

@ -0,0 +1,3 @@
include archivebox/VERSION
graft archivebox/templates
graft archivebox/templates/static

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.3.0

View file

@ -1 +0,0 @@
bin/archivebox

File diff suppressed because one or more lines are too long

16
requirements.txt Normal file
View file

@ -0,0 +1,16 @@
base32-crockford
# pip
# setuptools
# ipdb
# mypy
# flake8
# wpull
# pywb
# pyppeteer
# GitPython
# youtube-dl
# archivenow
# requests
#

View file

@ -1,18 +1,51 @@
import os
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
script_dir = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
VERSION = open(os.path.join(script_dir, 'VERSION'), 'r').read().strip()
GIT_HEAD = open(os.path.join(script_dir, '.git', 'HEAD'), 'r').read().strip().split(': ')[1]
GIT_SHA = open(os.path.join(script_dir, '.git', GIT_HEAD), 'r').read().strip()[:9]
PYPI_VERSION = "{}+{}".format(VERSION, GIT_SHA)
with open(os.path.join(script_dir, 'archivebox', 'VERSION'), 'w+') as f:
f.write(PYPI_VERSION)
setuptools.setup(
name="archivebox",
version="0.3.0",
version=PYPI_VERSION,
author="Nick Sweeting",
author_email="git@nicksweeting.com",
description="The self-hosted internet archive.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pirate/ArchiveBox",
project_urls={
'Documentation': 'https://github.com/pirate/ArchiveBox/Wiki',
'Community': 'https://github.com/pirate/ArchiveBox/wiki/Web-Archiving-Community',
'Source': 'https://github.com/pirate/ArchiveBox',
'Bug Tracker': 'https://github.com/pirate/ArchiveBox/issues',
'Roadmap': 'https://github.com/pirate/ArchiveBox/wiki/Roadmap',
'Changelog': 'https://github.com/pirate/ArchiveBox/wiki/Changelog',
'Donations': 'https://github.com/pirate/ArchiveBox/wiki/Donations',
},
packages=setuptools.find_packages(),
python_requires='>=3.6',
install_requires=[
"base32-crockford==0.3.0",
],
entry_points={
'console_scripts': [
'archivebox = archivebox.archive:main',
],
},
package_data={
'archivebox': ['VERSION', 'templates/*', 'templates/static/*'],
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",