From 2ec4556ac4228179ecb3671e852f1b5685067109 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Thu, 10 Mar 2016 15:17:49 -0300 Subject: [setup] Added dirspec url to requirements I also added a conditional to the setup.py so that python setup.py develop can be used even with the dirspec url --- pkg/requirements.pip | 7 +++---- setup.py | 9 ++++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkg/requirements.pip b/pkg/requirements.pip index 02fb189..bb6cf99 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -1,8 +1,7 @@ -jsonschema #<=0.8 -- are we done with this conflict? -dirspec +jsonschema pyopenssl python-dateutil pyzmq>=14.4.1 txzmq>=0.7.3 - -#autopep8 -- ??? +https://launchpad.net/dirspec/stable-13-10/13.10/+download/dirspec-13.10.tar.gz +dirspec diff --git a/setup.py b/setup.py index d62f2a6..22a4a59 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,10 @@ versioneer.versionfile_build = 'leap/common/_version.py' versioneer.tag_prefix = '' # tags are like 1.2.0 versioneer.parentdir_prefix = 'leap.common-' -parsed_reqs = utils.parse_requirements() +requirements = utils.parse_requirements() + +dependency_links = [requirement for requirement in requirements if requirement.startswith('http')] +requirements = [requirement for requirement in requirements if requirement not in dependency_links] tests_requirements = [ 'mock', @@ -134,8 +137,8 @@ setup( # packages=find_packages('src', exclude=['leap.common.tests']), packages=find_packages('src'), test_suite='leap.common.tests', - install_requires=parsed_reqs, - # dependency_links=dependency_links, + install_requires=requirements, + dependency_links=dependency_links, tests_require=tests_requirements, include_package_data=True, zip_safe=False, -- cgit v1.2.3 From 4fb7e8724302f4fe30891b6132e9b85472d42708 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Thu, 10 Mar 2016 15:42:54 -0300 Subject: [setup] pycommon pip installs in edit mode Leap pycommon will now be installed in editable mode when you use pip install, so that you can run the tests and develop using only pip --- pkg/requirements.pip | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/requirements.pip b/pkg/requirements.pip index bb6cf99..bbf60f1 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -5,3 +5,4 @@ pyzmq>=14.4.1 txzmq>=0.7.3 https://launchpad.net/dirspec/stable-13-10/13.10/+download/dirspec-13.10.tar.gz dirspec +-e . -- cgit v1.2.3 From 77ff0a10eb83263fdfb94e0bc9b1a38fd7e434f8 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Thu, 10 Mar 2016 16:04:57 -0300 Subject: [setup] Added docs on how to run the tests Also added dirspec directly to the setuptools for now, because it needs the dependency along with the url, but pip would break if it had both --- README.rst | 14 ++++++++++++++ pkg/requirements.pip | 1 - setup.py | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 349edce..f46b70e 100644 --- a/README.rst +++ b/README.rst @@ -29,3 +29,17 @@ Using `leap.common.http` needs some extra dependencies (twisted.web >= 14.0.2, python-service-identity). You can install them by running:: pip install leap.common[http] + + +Running the tests +------------------- +To run the tests, first run the setup with: + +.. code-block:: +pip install -r pkg/requirements.pip +pip install -r pkg/requirements-testing.pip + +After that you can run the tests with + +.. code-block:: +trial leap.common diff --git a/pkg/requirements.pip b/pkg/requirements.pip index bbf60f1..b2be31f 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -4,5 +4,4 @@ python-dateutil pyzmq>=14.4.1 txzmq>=0.7.3 https://launchpad.net/dirspec/stable-13-10/13.10/+download/dirspec-13.10.tar.gz -dirspec -e . diff --git a/setup.py b/setup.py index 22a4a59..1e77828 100644 --- a/setup.py +++ b/setup.py @@ -33,6 +33,7 @@ requirements = utils.parse_requirements() dependency_links = [requirement for requirement in requirements if requirement.startswith('http')] requirements = [requirement for requirement in requirements if requirement not in dependency_links] +requirements.append('dirspec') tests_requirements = [ 'mock', -- cgit v1.2.3