#!/usr/bin/env python
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import setuptools

setuptools.setup(
    setup_requires=['d2to1>=0.2.10,<0.3'],
    d2to1=True)

@@ -626,16 +626,390 @@
 cense.%0A%0A
+import os%0Aimport sys%0A%0Atry:%0A    sys.path += %5Bx for x in os.listdir(%22.%22) if x.endswith(%22.egg%22)%5D%0A    import d2to1  # flake8: noqa%0Aexcept ImportError:%0A    import subprocess%0A    if not subprocess.call(%0A        %5Bsys.executable%5D +%0A            %22-m pip.__init__ install distribute%3C0.7 d2to1%3E=0.2.10,%3C0.3%22.split()%0A    ):%0A        sys.exit(subprocess.call(%5Bsys.executable%5D + sys.argv))%0A
 import s

Use pip instead of easy_install for installation.