Permalink
Browse files

Merge pull request #709 from minrk/pypi

prepare to put it on pypi
  • Loading branch information...
parente committed Jul 25, 2017
2 parents 5ac2643 + 5ed2894 commit 89297bd5c4de8e27e009971b5ede1bbc369fbb05
Showing with 33 additions and 3 deletions.
  1. +2 −0 setup.cfg
  2. +31 −3 setup.py
View
@@ -0,0 +1,2 @@
[wheel]
universal = True
View
@@ -5,12 +5,27 @@
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
from distutils.command.sdist import sdist
from distutils.command.build import build
import os
from subprocess import check_call
import sys
pjoin = os.path.join
from setuptools import setup
def preflight():
check_call(['npm', 'install'])
check_call(['invoke', 'bower'])
check_call(['invoke', 'less'])
def invoke_first(cmd):
class InvokeFirst(cmd):
def run(self):
preflight()
return super(InvokeFirst, self).run()
return InvokeFirst
def walk_subpkg(name):
data_files = []
package_dir = 'nbviewer'
@@ -29,14 +44,16 @@ def walk_subpkg(name):
)
}
setup_args = dict(
name = "nbviewer",
version = '0.2.0',
version = '1.0.0',
packages = ["nbviewer"],
package_data = pkg_data,
setup_requires = ['invoke'],
author = "The Jupyter Development Team",
author_email = "ipython-dev@scipy.org",
url = 'http://nbviewer.ipython.org',
author_email = "jupyter@googlegroups.com",
url = 'https://nbviewer.jupyter.org',
description = "Jupyter Notebook Viewer",
long_description = "Jupyter nbconvert as a web service",
license = "BSD",
@@ -48,6 +65,17 @@ def walk_subpkg(name):
'Programming Language :: Python :: 3.3',
],
test_suite="nose.collector",
cmdclass = {
'sdist': invoke_first(sdist),
'build': invoke_first(build),
}
)
install_requires = setup_args['install_requires'] = []
with open('requirements.txt') as f:
for line in f:
req = line.strip()
if not req.startswith('#'):
install_requires.append(req)
setup(**setup_args)

0 comments on commit 89297bd

Please sign in to comment.