-
-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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']) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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']) | ||
) |