|
24 | 24 | long_description = "A customized pyvirtualdisplay for SeleniumBase." |
25 | 25 | about = {} |
26 | 26 | # Get the package version from the sbvirtualdisplay/__version__.py file |
27 | | -with open(os.path.join( |
28 | | - this_dir, "sbvirtualdisplay", "__version__.py" |
29 | | -), "rb") as f: |
| 27 | +with open( |
| 28 | + os.path.join(this_dir, "sbvirtualdisplay", "__version__.py"), "rb" |
| 29 | +) as f: |
30 | 30 | exec(f.read().decode("utf-8"), about) |
31 | 31 |
|
32 | 32 | if sys.argv[-1] == "publish": |
|
38 | 38 | reply = str(input_method(confirm_text)).lower().strip() |
39 | 39 | if reply == "yes": |
40 | 40 | print("\n*** Checking code health with flake8:\n") |
41 | | - os.system("python -m pip install 'flake8==3.9.2'") |
| 41 | + os.system("python -m pip install 'flake8==4.0.1'") |
42 | 42 | flake8_status = os.system("flake8 --exclude=temp") |
43 | 43 | if flake8_status != 0: |
44 | 44 | print("\nWARNING! Fix flake8 issues before publishing to PyPI!\n") |
45 | 45 | sys.exit() |
46 | 46 | else: |
47 | 47 | print("*** No flake8 issues detected. Continuing...") |
48 | | - print("\n*** Rebuilding distribution packages: ***\n") |
| 48 | + print("\n*** Removing existing distribution packages: ***\n") |
49 | 49 | os.system("rm -f dist/*.egg; rm -f dist/*.tar.gz; rm -f dist/*.whl") |
50 | 50 | os.system("rm -rf build/bdist.*; rm -rf build/lib") |
51 | | - os.system("python setup.py sdist bdist_wheel") # Create new tar/wheel |
| 51 | + print("\n*** Installing build: *** (Required for PyPI uploads)\n") |
| 52 | + os.system("python -m pip install --upgrade 'build>=0.7.0'") |
52 | 53 | print("\n*** Installing twine: *** (Required for PyPI uploads)\n") |
53 | | - os.system("python -m pip install --upgrade 'twine>=1.15.0'") |
| 54 | + os.system("python -m pip install --upgrade 'twine>=4.0.0'") |
54 | 55 | print("\n*** Installing tqdm: *** (Required for PyPI uploads)\n") |
55 | | - os.system("python -m pip install --upgrade 'tqdm>=4.61.2'") |
| 56 | + os.system("python -m pip install --upgrade 'tqdm>=4.64.0'") |
| 57 | + print("\n*** Rebuilding distribution packages: ***\n") |
| 58 | + os.system("python -m build") # Create new tar/wheel |
56 | 59 | print("\n*** Publishing The Release to PyPI: ***\n") |
57 | 60 | os.system("python -m twine upload dist/*") # Requires ~/.pypirc Keys |
58 | 61 | print("\n*** The Release was PUBLISHED SUCCESSFULLY to PyPI! :) ***\n") |
|
111 | 114 | "Topic :: Utilities", |
112 | 115 | ], |
113 | 116 | python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", |
114 | | - install_requires=[ |
115 | | - ], |
| 117 | + install_requires=[], |
116 | 118 | extras_require={ |
117 | 119 | # pip install -e .[coverage] |
| 120 | + # Usage: coverage run -m pytest; coverage html; coverage report |
118 | 121 | "coverage": [ |
119 | | - "coverage==5.5", |
120 | | - "pytest-cov==2.12.1", |
| 122 | + 'coverage==5.5;python_version<"3.6"', |
| 123 | + 'coverage==6.2;python_version>="3.6" and python_version<"3.7"', |
| 124 | + 'coverage==6.3.2;python_version>="3.7"', |
| 125 | + 'pytest-cov==2.12.1;python_version<"3.6"', |
| 126 | + 'pytest-cov==3.0.0;python_version>="3.6"', |
121 | 127 | ], |
122 | 128 | # pip install -e .[flake] |
| 129 | + # Usage: flake8 |
123 | 130 | "flake": [ |
124 | 131 | 'flake8==3.7.9;python_version<"3.5"', |
125 | | - 'flake8==3.9.2;python_version>="3.5"', |
| 132 | + 'flake8==3.9.2;python_version>="3.5" and python_version<"3.6"', |
| 133 | + 'flake8==4.0.1;python_version>="3.6"', |
| 134 | + "mccabe==0.6.1", |
126 | 135 | 'pyflakes==2.1.1;python_version<"3.5"', |
127 | | - 'pyflakes==2.3.1;python_version>="3.5"', |
| 136 | + 'pyflakes==2.3.1;python_version>="3.5" and python_version<"3.6"', |
| 137 | + 'pyflakes==2.4.0;python_version>="3.6"', |
128 | 138 | 'pycodestyle==2.5.0;python_version<"3.5"', |
129 | | - 'pycodestyle==2.7.0;python_version>="3.5"', |
| 139 | + 'pycodestyle==2.7.0;python_version>="3.5" and python_version<"3.6"', # noqa: E501 |
| 140 | + 'pycodestyle==2.8.0;python_version>="3.6"', |
130 | 141 | ], |
131 | 142 | }, |
132 | 143 | packages=[ |
133 | 144 | "sbvirtualdisplay", |
134 | 145 | ], |
135 | 146 | include_package_data=True, |
136 | | - entry_points={ |
137 | | - }, |
| 147 | + entry_points={}, |
138 | 148 | ) |
0 commit comments