Removed Python support

This commit is contained in:
Steve Gravrock
2021-07-26 18:28:38 -07:00
parent 0720c88252
commit 0424d4ae99
11 changed files with 3 additions and 184 deletions

View File

@@ -42,7 +42,7 @@ Once you've pushed a feature branch to your forked repo, you're ready to open a
* mirrors the source directory
* there are some additional files
* `/lib` contains the compiled copy of Jasmine. This is used to self-test and
distributed as the `jasmine-core` Node, Ruby, and Python packages.
distributed as the `jasmine-core` Node, and Ruby packages.
### Self-testing

2
.gitignore vendored
View File

@@ -17,11 +17,9 @@ pkg/*
.sass-cache/*
src/html/.sass-cache/*
node_modules/
*.pyc
sauce_connect.log
*.swp
build/
*.egg-info/
dist
nbproject/
*.iml

View File

@@ -1,6 +0,0 @@
recursive-include . *.py
prune node_modules
include lib/jasmine-core/*.js
include lib/jasmine-core/*.css
include images/*.png
include package.json

View File

@@ -50,13 +50,6 @@ When ready to release - specs are all green and the stories are done:
1. __NOTE__: You will likely need to push a new jasmine gem with a dependent version right after this release. See below.
1. `rake release` - tags the repo with the version, builds the `jasmine-core` gem, pushes the gem to Rubygems.org. In order to release you will have to ensure you have rubygems creds locally.
### Release the core Python egg
Install [twine](https://github.com/pypa/twine)
1. `python setup.py sdist`
1. `twine upload dist/jasmine-core-<version>.tar.gz` You will need pypi credentials to upload the egg.
### Release the core NPM module
1. Run the tests on Windows. (CI only tests on Linux.)

View File

View File

@@ -1 +0,0 @@
from .core import Core

View File

@@ -27,7 +27,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js` and `jasmine_html.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments will have different mechanisms.
The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.

View File

@@ -5,7 +5,7 @@
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js` and `jasmine_html.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments will have different mechanisms.
The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.

View File

@@ -1,94 +0,0 @@
import pkg_resources
import os
if 'SUPPRESS_JASMINE_DEPRECATION' not in os.environ:
print('DEPRECATION WARNING:\n' +
'\n' +
'The Jasmine packages for Python are deprecated. There will be no further\n' +
'releases after the end of the Jasmine 3.x series. We recommend migrating to the\n' +
'following options:\n' +
'\n' +
'* jasmine-browser-runner (<https://github.com/jasmine/jasmine-browser>,\n' +
' `npm install jasmine-browser-runner`) to run specs in browsers, including\n' +
' headless Chrome and Saucelabs. This is the most direct replacement for the\n' +
' jasmine server` and `jasmine ci` commands provided by the `jasmine` Python\n' +
' package.\n' +
'* The jasmine npm package (<https://github.com/jasmine/jasmine-npm>,\n' +
' `npm install jasmine`) to run specs under Node.js.\n' +
'* The standalone distribution from the latest Jasmine release\n' +
' <https://github.com/jasmine/jasmine/releases> to run specs in browsers with\n' +
' no additional tools.\n' +
'* The jasmine-core npm package (`npm install jasmine-core`) if all you need is\n' +
' the Jasmine assets. This is the direct equivalent of the jasmine-core Python\n' +
' package.\n' +
'\n' +
'Except for the standalone distribution, all of the above are distributed through\n' +
'npm.\n' +
'\n' +
'To prevent this message from appearing, set the SUPPRESS_JASMINE_DEPRECATION\n' +
'environment variable.\n')
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
class Core(object):
@classmethod
def js_package(cls):
return __package__
@classmethod
def css_package(cls):
return __package__
@classmethod
def image_package(cls):
return __package__ + ".images"
@classmethod
def js_files(cls):
js_files = sorted(list(filter(lambda x: '.js' in x, pkg_resources.resource_listdir(cls.js_package(), '.'))))
# jasmine.js needs to be first
js_files.insert(0, 'jasmine.js')
# boot needs to be last
js_files.remove('boot.js')
js_files.append('boot.js')
# Remove the new boot files. jasmine-py will continue to use the legacy
# boot.js.
js_files.remove('boot0.js')
js_files.remove('boot1.js')
return cls._uniq(js_files)
@classmethod
def css_files(cls):
return cls._uniq(sorted(filter(lambda x: '.css' in x, pkg_resources.resource_listdir(cls.css_package(), '.'))))
@classmethod
def favicon(cls):
return 'jasmine_favicon.png'
@classmethod
def _uniq(self, items, idfun=None):
# order preserving
if idfun is None:
def idfun(x): return x
seen = {}
result = []
for item in items:
marker = idfun(item)
# in old Python versions:
# if seen.has_key(marker)
# but in new ones:
if marker in seen:
continue
seen[marker] = 1
result.append(item)
return result

View File

@@ -1 +0,0 @@
ordereddict==1.1

View File

@@ -1,70 +0,0 @@
from setuptools import setup, find_packages, os
import json
with open('package.json') as packageFile:
version = json.load(packageFile)['version']
short_description=('Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on '+
'browsers, DOM, or any JavaScript framework. Thus it\'s suited for websites, '+
'Node.js (http://nodejs.org) projects, or anywhere that JavaScript can run.')
deprecation=('The Jasmine packages for Python are deprecated. There will be no further\n' +
'releases after the end of the Jasmine 3.x series. We recommend migrating to the\n' +
'following options:\n' +
'\n' +
'* jasmine-browser-runner (<https://github.com/jasmine/jasmine-browser>,\n' +
' `npm install jasmine-browser-runner`) to run specs in browsers, including\n' +
' headless Chrome and Saucelabs. This is the most direct replacement for the\n' +
' jasmine server` and `jasmine ci` commands provided by the `jasmine` Python\n' +
' package.\n' +
'* The jasmine npm package (<https://github.com/jasmine/jasmine-npm>,\n' +
' `npm install jasmine`) to run specs under Node.js.\n' +
'* The standalone distribution from the latest Jasmine release\n' +
' <https://github.com/jasmine/jasmine/releases> to run specs in browsers with\n' +
' no additional tools.\n' +
'* The jasmine-core npm package (`npm install jasmine-core`) if all you need is\n' +
' the Jasmine assets. This is the direct equivalent of the jasmine-core Python\n' +
' package.\n' +
'\n' +
'Except for the standalone distribution, all of the above are distributed through\n'
'npm.\n')
long_description = short_description + '\n\n' + deprecation
setup(
name="jasmine-core",
version=version,
url="http://jasmine.github.io",
author="Pivotal Labs",
author_email="jasmine-js@googlegroups.com",
description=short_description,
long_description=long_description,
long_description_content_type='text/plain',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
packages=['jasmine_core', 'jasmine_core.images'],
package_dir={'jasmine_core': 'lib/jasmine-core', 'jasmine_core.images': 'images'},
package_data={'jasmine_core': ['*.js', '*.css'], 'jasmine_core.images': ['*.png']},
include_package_data=True,
install_requires=['glob2>=0.4.1', 'ordereddict==1.1']
)