Skip to content

Commit

Permalink
setup.py reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
dennybaa committed Jul 1, 2015
1 parent 76be02b commit a39a38a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 66 deletions.
50 changes: 17 additions & 33 deletions st2api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import re
import os.path
from pip.req import parse_requirements
from setuptools import setup, find_packages


def fetch_requirements():
links = []
reqs = []
for req in parse_requirements('requirements.txt', session=False):
if req.link:
links.append(str(req.link))
reqs.append(str(req.req))
return (reqs, links)


current_dir = os.path.dirname(os.path.realpath(__file__))
version_file = os.path.join(current_dir, '../st2client/st2client/__init__.py')
with open(version_file, 'r') as f:
vmatch = re.search(r'__version__ = [\'\"](.*)[\'\"]$', f.read(), flags=re.MULTILINE)


install_reqs, dep_links = fetch_requirements()
ST2_COMPONENT = os.path.basename(current_dir)
ST2_VERSION = vmatch.group(1)

try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages

setup(
name=ST2_COMPONENT,
version=ST2_VERSION,
description='{} component'.format(ST2_COMPONENT),
name='st2api',
version='0.4.0',
description='',
author='StackStorm',
author_email='[email protected]',
install_requires=install_reqs,
dependency_links=dep_links,
test_suite=ST2_COMPONENT,
install_requires=[
"pecan",
],
package_data={
'st2api': ['templates/*.html']
},
test_suite='st2api',
zip_safe=False,
include_package_data=True,
packages=find_packages(exclude=['setuptools'])
packages=find_packages(exclude=['ez_setup'])
)
47 changes: 14 additions & 33 deletions st2common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import re
import os.path
from pip.req import parse_requirements
from setuptools import setup, find_packages


def fetch_requirements():
links = []
reqs = []
for req in parse_requirements('requirements.txt', session=False):
if req.link:
links.append(str(req.link))
reqs.append(str(req.req))
return (reqs, links)


current_dir = os.path.dirname(os.path.realpath(__file__))
version_file = os.path.join(current_dir, '../st2client/st2client/__init__.py')
with open(version_file, 'r') as f:
vmatch = re.search(r'__version__ = [\'\"](.*)[\'\"]$', f.read(), flags=re.MULTILINE)


install_reqs, dep_links = fetch_requirements()
ST2_COMPONENT = os.path.basename(current_dir)
ST2_VERSION = vmatch.group(1)

try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages

setup(
name=ST2_COMPONENT,
version=ST2_VERSION,
description='{} component'.format(ST2_COMPONENT),
name='st2common',
version='0.4.0',
description='',
author='StackStorm',
author_email='[email protected]',
install_requires=install_reqs,
dependency_links=dep_links,
test_suite=ST2_COMPONENT,
install_requires=[
"pecan",
],
test_suite='st2common',
zip_safe=False,
include_package_data=True,
packages=find_packages(exclude=['setuptools'])
packages=find_packages(exclude=['ez_setup'])
)

0 comments on commit a39a38a

Please sign in to comment.