Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Merge 0392f44 into 48646cf
Browse files Browse the repository at this point in the history
  • Loading branch information
diraol committed Mar 30, 2017
2 parents 48646cf + 0392f44 commit c1fd4b0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
2 changes: 0 additions & 2 deletions kytos/core/__init__.py
@@ -1,4 +1,2 @@
"""Kytos.core is the module with main classes used in Kytos."""
from kytos.core.controller import Controller

__version__ = "2017.1b1"
2 changes: 1 addition & 1 deletion kytos/core/config.py
Expand Up @@ -9,7 +9,7 @@
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from configparser import ConfigParser

from kytos.core import __version__
from kytos.core.metadata import __version__

if 'VIRTUAL_ENV' in os.environ:
BASE_ENV = os.environ['VIRTUAL_ENV']
Expand Down
11 changes: 11 additions & 0 deletions kytos/core/metadata.py
@@ -0,0 +1,11 @@
"""Holds main metadata information about the project.
The present metadata is intended to be used mainly on the setup.
"""
__name__ = 'kytos'
__version__ = '2017.1b1'
__author__ = 'Kytos Team'
__author_email__ = 'devel@lists.kytos.io'
__license__ = 'MIT'
__url__ = 'https://github.com/kytos/kytos'
__description__ = 'Kytos, an open source SDN Platform'
20 changes: 11 additions & 9 deletions setup.py
Expand Up @@ -4,6 +4,7 @@
descriptions.
"""
import os
import re
import sys
from abc import abstractmethod
from subprocess import CalledProcessError, call, check_call
Expand All @@ -12,8 +13,6 @@
from setuptools.command.develop import develop
from setuptools.command.test import test as TestCommand

from kytos.core import __version__

if 'bdist_wheel' in sys.argv:
raise RuntimeError("This setup.py does not support wheels")

Expand Down Expand Up @@ -126,19 +125,22 @@ def create_path(self, file_name):

requirements = [i.strip() for i in open("requirements.txt").readlines()]

meta_file = open("kytos/core/metadata.py").read()
metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", meta_file))

# TODO: Move this to a more appropiate place
napps_dir = os.path.join(BASE_ENV, 'var/lib/kytos/napps/.installed')

if not os.path.exists(napps_dir):
os.makedirs(napps_dir, exist_ok=True)

setup(name='kytos',
version=__version__,
description='Kytos, an open source SDN Plataform.',
url='http://github.com/kytos/kytos-core',
author='Kytos Team',
author_email='of-ng-dev@ncc.unesp.br',
license='MIT',
setup(name=metadata.get('name'),
version=metadata.get('version'),
description=metadata.get('description'),
url=metadata.get('url'),
author=metadata.get('author'),
author_email=metadata.get('author_email'),
license=metadata.get('license'),
test_suite='tests',
install_requires=requirements,
dependency_links=[
Expand Down

0 comments on commit c1fd4b0

Please sign in to comment.