potiuk commented on a change in pull request #4938: [AIRFLOW-4117] 
Multi-staging Image - Travis CI tests [Step 3/3]
URL: https://github.com/apache/airflow/pull/4938#discussion_r268896300
 
 

 ##########
 File path: setup.py
 ##########
 @@ -35,31 +34,34 @@
 
 PY3 = sys.version_info[0] == 3
 
-with io.open('README.md', encoding='utf-8') as f:
-    long_description = f.read()
+try:
+    FileNotFoundError
+except NameError:
+    FileNotFoundError = IOError
 
+try:
+    with io.open('README.md', encoding='utf-8') as f:
+        long_description = f.read()
+except FileNotFoundError:
+    long_description = ''
 
-class Tox(TestCommand):
-    user_options = [('tox-args=', None, "Arguments to pass to tox")]
+
+class CleanCommand(Command):
+    """Custom clean command to tidy up the project root."""
+    user_options = []
 
     def initialize_options(self):
-        TestCommand.initialize_options(self)
-        self.tox_args = ''
+        pass
 
     def finalize_options(self):
-        TestCommand.finalize_options(self)
-        self.test_args = []
-        self.test_suite = True
+        pass
 
-    def run_tests(self):
-        # import here, cause outside the eggs aren't loaded
-        import tox
-        errno = tox.cmdline(args=self.tox_args.split())
-        sys.exit(errno)
+    def run(self):
+        os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
 
 Review comment:
   To be cleaned-up indeed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to