Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Implemented proper python packaging

  • Loading branch information...
commit 562d3ccf62a0e280e7a06cde754533ec1098a9cb 1 parent 53a710f
Matt Norton authored
View
9 README.markdown
@@ -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')
View
0  py/LICENSE → py/ua_parser/LICENSE
File renamed without changes
View
0  py/__init__.py → py/ua_parser/__init__.py
File renamed without changes
View
0  py/user_agent_parser.py → py/ua_parser/user_agent_parser.py
File renamed without changes
View
0  py/user_agent_parser_test.py → py/ua_parser/user_agent_parser_test.py
File renamed without changes
View
21 setup.py
@@ -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'])]
+)
Please sign in to comment.
Something went wrong with that request. Please try again.