Skip to content

Commit

Permalink
[fix] setup & requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopiovam committed Apr 6, 2016
1 parent 14ed67a commit e87e221
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django>=1.4.10
django-admin-sortable==1.7.3
django-ckeditor-updated==4.4.0
-e git+https://github.com/laborautonomo/django-la-tags@v0.1.0#egg=django-la-tags
django-la-tags==v0.1.0
29 changes: 7 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,31 @@
# -*- coding: utf-8 -*-

import os
from os.path import join, dirname
import sys

from pip.req import parse_requirements
from setuptools import setup, find_packages

# allow setup.py to be run from any path and open files
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

ROOT = dirname(__file__)
try:
REQUIREMENTS = open('requirements.txt').read()
except:
REQUIREMENTS = None


try:
README = open('README.md').read()
except:
README = None

def get_requirements(filename):
install_requires = []
dependency_links = []

for line in open(join(ROOT, filename)):
if '://' in line:
dependency_links.append(line.replace('-e','').strip())
else:
install_requires.append(line)

return install_requires, dependency_links

install_requires, dependency_links = get_requirements('requirements.txt')
print install_requires
print dependency_links
setup(
name='django-la-cms',
version="v0.1.0",
description=(
'Django app for a simple content management system'
),
long_description=README,
install_requires=install_requires,
dependency_links=dependency_links,
install_requires=REQUIREMENTS,
dependency_links=['https://github.com/laborautonomo/django-la-tags/tarball/master#egg=django-la-tags-v0.1.0'],
author='Fábio Piovam Elias',
author_email='[email protected]',
url='https://github.com/laborautonomo/django-la-cms/',
Expand Down

0 comments on commit e87e221

Please sign in to comment.