Skip to content

Commit

Permalink
Fix packaging again
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisballinger committed Oct 23, 2013
1 parent 76e2718 commit 137f3d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include README.md LICENSE requirements.txt
include README.md LICENSE
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

38 changes: 5 additions & 33 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,16 @@
#!/usr/bin/env python
import os, re
from distutils.core import setup

def get_requirements(filename):
"""
Read requirements and dependency links from a file passed by parameter
and return them as two lists in a tuple.
"""
def add_dependency_link(line):
link = re.sub(r'\s*-[ef]\s+', '', line)
filename = os.path.basename(link.split('://')[1])
url = link.split(filename)[0]
if url not in dependency_links:
dependency_links.append(url)

requirements = []
dependency_links = []
for line in open(filename, 'r').read().split('\n'):
if re.match(r'(\s*#)|(\s*$)', line):
continue
if re.match(r'\s*-e\s+', line):
# TODO support version numbers
requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', line))
add_dependency_link(line)
elif re.match(r'\s*-f\s+', line):
add_dependency_link(line)
else:
requirements.append(line)
return requirements, dependency_links

requirements, dependency_links = get_requirements('requirements.txt')

setup(name='localizable',
version='0.1.1',
version='0.1.2',
description='Localizable.strings parser for Apple-specific localization files',
author='Chris Ballinger',
author_email='[email protected]',
url='https://github.com/chrisballinger/python-localizable',
license="GPLv2",
long_description=open('README.md').read(),
py_modules=['localizable'],
install_requires=requirements,
)
install_requires=[
'chardet',
],
)

0 comments on commit 137f3d2

Please sign in to comment.