Skip to content
Newer
Older
100644 67 lines (56 sloc) 1.97 KB
382488d @areski clean files hearders
areski authored
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
165d246 @areski update version + fix setup.py
areski authored
4 from setuptools import setup, find_packages
5 import country_dialcode
826898c @areski import project
areski authored
6 import os
7 import re
c1e185d @areski update setup.py + add CHANGES
areski authored
8
9
d2378f5 @areski new release 0.5.0
areski authored
10 def read(*parts):
11 return open(os.path.join(os.path.dirname(__file__), *parts)).read()
7ec40f3 @areski update setup.py trying to fix for PyPI
areski authored
12
826898c @areski import project
areski authored
13
14 def parse_requirements(file_name):
15 requirements = []
16 for line in open(file_name, 'r').read().split('\n'):
17 if re.match(r'(\s*#)|(\s*$)', line):
18 continue
19 if re.match(r'\s*-e\s+', line):
20 requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', line))
21 elif re.match(r'(\s*git)|(\s*hg)', line):
22 pass
23 else:
24 requirements.append(line)
25 return requirements
26
27
165d246 @areski update version + fix setup.py
areski authored
28 def parse_dependency_links(file_name):
826898c @areski import project
areski authored
29 dependency_links = []
30 for line in open(file_name, 'r').read().split('\n'):
165d246 @areski update version + fix setup.py
areski authored
31 if re.match(r'\s*-[ef]\s+', line):
32 dependency_links.append(re.sub(r'\s*-[ef]\s+', '', line))
826898c @areski import project
areski authored
33
165d246 @areski update version + fix setup.py
areski authored
34 return dependency_links
826898c @areski import project
areski authored
35
812babd @areski add manual loader for the fixture
areski authored
36
826898c @areski import project
areski authored
37 setup(
38 name='django-country-dialcode',
165d246 @areski update version + fix setup.py
areski authored
39 version=country_dialcode.__version__,
c1e185d @areski update setup.py + add CHANGES
areski authored
40 description='Django Application providing Dialcode and Countries code',
d2378f5 @areski new release 0.5.0
areski authored
41 long_description=read('README.rst'),
826898c @areski import project
areski authored
42 author='Belaid Arezqui',
43 author_email='areski@gmail.com',
44 url='http://github.com/Star2Billing/django-country-dialcode',
d2378f5 @areski new release 0.5.0
areski authored
45 zip_safe=False,
46 packages=find_packages(exclude=["tests", "docs"]),
812babd @areski add manual loader for the fixture
areski authored
47 package_data={
48 "": [
49 "fixtures/*",
50 ]
51 },
430e08a @areski remove requirements file as it's empty
areski authored
52 # install_requires=parse_requirements('requirements.txt'),
53 # dependency_links=parse_dependency_links('requirements.txt'),
d2378f5 @areski new release 0.5.0
areski authored
54 include_package_data=True,
826898c @areski import project
areski authored
55 license='MIT License',
56 classifiers=[
165d246 @areski update version + fix setup.py
areski authored
57 'Development Status :: 5 - Production/Stable',
826898c @areski import project
areski authored
58 'Environment :: Web Environment',
59 'Framework :: Django',
60 'Intended Audience :: Developers',
61 'License :: OSI Approved :: MIT License',
62 'Operating System :: OS Independent',
63 'Programming Language :: Python',
64 'Topic :: Software Development :: Libraries :: Python Modules'
65 ],
66 )
Something went wrong with that request. Please try again.