Permalink
Browse files

Implemented proper python packaging

  • Loading branch information...
Matt Norton
Matt Norton committed Jun 7, 2012
1 parent 53a710f commit 562d3ccf62a0e280e7a06cde754533ec1098a9cb
View
@@ -36,16 +36,13 @@ Usage :: [node.js][1]
Usage :: python
---------------
- # Python won't do with dashes in module names so you'll need to rename,
- # copy, or symlink this directory and also add an __init__.py file,
- # like so:
+ # Install this into python site_packages like so:
#
- # ln -s ua-parser ua_parser
- # touch ua_parser/__init__.py
+ # python setup.py install
#
# Now you're good to go.
- from ua_parser.py import user_agent_parser
+ from ua_parser import user_agent_parser
# On the server, you could use a WebOB request object.
user_agent_string = request.META.get('HTTP_USER_AGENT')
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+from setuptools import setup, find_packages
+
+dependencies = [
+ 'pyyaml',
+]
+
+dependency_links = [
+]
+
+setup(
+ name='ua_parser',
+ version='1.0',
+ description='',
+ author='PBS',
+ author_email='no-reply@pbs.org',
+ packages = find_packages('py'),
+ package_dir={'':'py'},
+ include_package_data=True,
+ data_files=[('',['regexes.yaml'])]
+)

0 comments on commit 562d3cc

Please sign in to comment.